1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/file_mixed_content_frameNavigation_blankTarget.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +Tests for Mixed Content Blocker - Opening link with _blank target in an https iframe. 1.8 +https://bugzilla.mozilla.org/show_bug.cgi?id=841850 1.9 +--> 1.10 +<head> 1.11 + <meta charset="utf-8"> 1.12 + <title>Tests for Mixed Content Frame Navigation</title> 1.13 +</head> 1.14 +<body> 1.15 +<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> 1.16 + 1.17 +<script> 1.18 + var blankTarget = document.getElementById("blankTarget"); 1.19 + blankTarget.click(); 1.20 + 1.21 + var os = SpecialPowers.Cc["@mozilla.org/observer-service;1"]. 1.22 + getService(SpecialPowers.Components.interfaces.nsIObserverService); 1.23 + var observer = { 1.24 + observe: function(subject, topic, data) { 1.25 + if(topic == "content-document-global-created" && data =="http://example.com") { 1.26 + parent.parent.postMessage({"test": "blankTarget", "msg": "opened an http link with target=_blank from a secure page"}, "http://mochi.test:8888"); 1.27 + os.removeObserver(observer, "content-document-global-created"); 1.28 + } 1.29 + } 1.30 + } 1.31 + os.addObserver(observer, "content-document-global-created", false); 1.32 + 1.33 +</script> 1.34 +</body> 1.35 +</html>