summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/test_triggeringprincipal_window_open.html
diff options
context:
space:
mode:
Diffstat (limited to 'docshell/test/navigation/test_triggeringprincipal_window_open.html')
-rw-r--r--docshell/test/navigation/test_triggeringprincipal_window_open.html28
1 files changed, 3 insertions, 25 deletions
diff --git a/docshell/test/navigation/test_triggeringprincipal_window_open.html b/docshell/test/navigation/test_triggeringprincipal_window_open.html
index d5d7f210b..dbee21777 100644
--- a/docshell/test/navigation/test_triggeringprincipal_window_open.html
+++ b/docshell/test/navigation/test_triggeringprincipal_window_open.html
@@ -13,8 +13,7 @@
/* We call window.open() using different URIs and make sure the triggeringPrincipal
* loadingPrincipal are correct.
* Test1: window.open(http:)
- * Test2: window.open(data:)
- * Test3: window.open(javascript:)
+ * Test2: window.open(javascript:)
*/
const TRIGGERING_PRINCIPAL_URI =
@@ -22,7 +21,7 @@ const TRIGGERING_PRINCIPAL_URI =
SimpleTest.waitForExplicitFinish();
-const NUM_TESTS = 3;
+const NUM_TESTS = 2;
var test_counter = 0;
function checkFinish() {
@@ -54,28 +53,7 @@ httpWin.onload = function() {
}
// ----------------------------------------------------------------------------
-// Test 2: window.open(data:)
-var dataWin = window.open("data:text/html,<html><body>data</body></html>", "_blank", "width=10,height=10");
-dataWin.onload = function() {
- var dataChannel = SpecialPowers.wrap(dataWin.document).docShell.currentDocumentChannel;
- var dataTriggeringPrincipal = dataChannel.loadInfo.triggeringPrincipal.URI.asciiSpec;
- var dataLoadingPrincipal = dataChannel.loadInfo.loadingPrincipal;
-
- is(dataTriggeringPrincipal, TRIGGERING_PRINCIPAL_URI,
- "TriggeringPrincipal for window.open(data:) should be the principal of the document");
-
- is(dataWin.document.referrer, "",
- "Referrer for window.open(data:) should be empty");
-
- is(dataLoadingPrincipal, null,
- "LoadingPrincipal for window.open(data:) should be null");
-
- dataWin.close();
- checkFinish();
-}
-
-// ----------------------------------------------------------------------------
-// Test 3: window.open(javascript:)
+// Test 2: window.open(javascript:)
var jsWin = window.open("javascript:'<html><body>js</body></html>';", "_blank", "width=10,height=10");
jsWin.onload = function() {
var jsChannel = SpecialPowers.wrap(jsWin.document).docShell.currentDocumentChannel;