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 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | Tests for Mixed Content Blocker - Opening link with _blank target in an https iframe. |
michael@0 | 5 | https://bugzilla.mozilla.org/show_bug.cgi?id=841850 |
michael@0 | 6 | --> |
michael@0 | 7 | <head> |
michael@0 | 8 | <meta charset="utf-8"> |
michael@0 | 9 | <title>Tests for Mixed Content Frame Navigation</title> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | <a href="http://example.com/tests/content/base/test/file_mixed_content_frameNavigation_innermost.html?blankTarget" id="blankTarget" target="_blank">Go to http site</a> |
michael@0 | 13 | |
michael@0 | 14 | <script> |
michael@0 | 15 | var blankTarget = document.getElementById("blankTarget"); |
michael@0 | 16 | blankTarget.click(); |
michael@0 | 17 | |
michael@0 | 18 | var os = SpecialPowers.Cc["@mozilla.org/observer-service;1"]. |
michael@0 | 19 | getService(SpecialPowers.Components.interfaces.nsIObserverService); |
michael@0 | 20 | var observer = { |
michael@0 | 21 | observe: function(subject, topic, data) { |
michael@0 | 22 | if(topic == "content-document-global-created" && data =="http://example.com") { |
michael@0 | 23 | parent.parent.postMessage({"test": "blankTarget", "msg": "opened an http link with target=_blank from a secure page"}, "http://mochi.test:8888"); |
michael@0 | 24 | os.removeObserver(observer, "content-document-global-created"); |
michael@0 | 25 | } |
michael@0 | 26 | } |
michael@0 | 27 | } |
michael@0 | 28 | os.addObserver(observer, "content-document-global-created", false); |
michael@0 | 29 | |
michael@0 | 30 | </script> |
michael@0 | 31 | </body> |
michael@0 | 32 | </html> |