test_bug1281071.xul 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  3. <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
  4. type="text/css"?>
  5. <!--
  6. https://bugzilla.mozilla.org/show_bug.cgi?id=1281071
  7. -->
  8. <window title="Mozilla Bug 1281071"
  9. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  10. <script type="application/javascript"
  11. src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  12. <!-- test code goes here -->
  13. <script type="application/javascript"><![CDATA[
  14. SimpleTest.waitForExplicitFinish();
  15. function go() {
  16. var w = $('ifr').contentWindow.wrappedJSObject;
  17. is(w.tryLocationGet(), "Permission to call 'get location' denied.",
  18. "Trying to get our location object should throw");
  19. SimpleTest.finish();
  20. }
  21. ]]></script>
  22. <!-- test results are displayed in the html:body -->
  23. <body xmlns="http://www.w3.org/1999/xhtml">
  24. <iframe type="content"
  25. src="http://mochi.test:8888/chrome/js/xpconnect/tests/chrome/file_bug1281071.html"
  26. onload="go()"
  27. id="ifr">
  28. </iframe>
  29. </body>
  30. </window>