Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 3 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> |
michael@0 | 4 | <!-- |
michael@0 | 5 | Test for Persistent Storage in chrome |
michael@0 | 6 | --> |
michael@0 | 7 | <window id="sample-window" width="400" height="400" |
michael@0 | 8 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 9 | <script type="application/javascript" |
michael@0 | 10 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="chrome://mochikit/content/chrome-harness.js"></script> |
michael@0 | 13 | |
michael@0 | 14 | <script type="application/javascript"> |
michael@0 | 15 | var SimpleTest = window.opener.wrappedJSObject.SimpleTest; |
michael@0 | 16 | |
michael@0 | 17 | document.addEventListener("DOMWindowCreated", function(e) { |
michael@0 | 18 | var otherWindow = e.target.defaultView.wrappedJSObject; |
michael@0 | 19 | SimpleTest.is(e.type, "DOMWindowCreated", "DOMWindowCreated: " + otherWindow); |
michael@0 | 20 | otherWindow.doneFunction = function() { |
michael@0 | 21 | SimpleTest.ok(true, "doneFunction was called"); |
michael@0 | 22 | SimpleTest.finish(); |
michael@0 | 23 | window.close(); |
michael@0 | 24 | }; |
michael@0 | 25 | }, false); |
michael@0 | 26 | |
michael@0 | 27 | var root = getRootDirectory(window.location.href); |
michael@0 | 28 | var el = document.createElement("iframe"); |
michael@0 | 29 | el.setAttribute('type', 'content'); |
michael@0 | 30 | el.setAttribute('src', root + 'DOMWindowCreated_content.html'); |
michael@0 | 31 | document.documentElement.appendChild(el); |
michael@0 | 32 | </script> |
michael@0 | 33 | </window> |