Bug 1363612 - Part 1: move to seperate files. r=smaug
authorYoshi Huang <allstars.chh@mozilla.com>
Wed, 10 May 2017 10:40:41 +0800
changeset 358504 a0e3dc83b335d00bd01818bb91137dcfd4c4a08b
parent 358503 031561df3b033fc225b9980cd116ae50c13dd5d5
child 358505 adc78c679f03e59f36692ffe9294156392ed7eea
push id90348
push useryhuang@mozilla.com
push dateTue, 16 May 2017 09:02:06 +0000
treeherdermozilla-inbound@1e29842a2984 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1363612
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1363612 - Part 1: move to seperate files. r=smaug
dom/base/test/file1_setting_opener.html
dom/base/test/file2_setting_opener.html
dom/base/test/file3_setting_opener.html
dom/base/test/file4_setting_opener.html
dom/base/test/file_bug426646-1.html
dom/base/test/file_bug426646-2.html
dom/base/test/file_bug753278.html
dom/base/test/iframe1_bug426646.html
dom/base/test/iframe2_bug426646.html
dom/base/test/mochitest.ini
dom/base/test/test_bug753278.html
dom/base/test/test_setting_opener.html
dom/broadcastchannel/tests/mochitest.ini
dom/broadcastchannel/tests/testUrl1_bfcache.html
dom/broadcastchannel/tests/testUrl2_bfcache.html
dom/broadcastchannel/tests/test_bfcache.html
dom/tests/mochitest/bugs/file1_bug414291.html
dom/tests/mochitest/bugs/file1_bug437361.html
dom/tests/mochitest/bugs/file2_bug414291.html
dom/tests/mochitest/bugs/file2_bug437361.html
dom/tests/mochitest/bugs/file2_bug504862.html
dom/tests/mochitest/bugs/file3_bug414291.html
dom/tests/mochitest/bugs/file_bug504862.html
dom/tests/mochitest/bugs/mochitest.ini
dom/tests/mochitest/bugs/test1_bug369306.html
dom/tests/mochitest/bugs/test1_bug622361.html
dom/tests/mochitest/bugs/test2_bug369306.html
dom/tests/mochitest/bugs/test2_bug622361.html
dom/tests/mochitest/bugs/test_bug369306.html
dom/tests/mochitest/bugs/test_bug414291.html
dom/tests/mochitest/bugs/test_bug437361.html
dom/tests/mochitest/bugs/test_bug622361.html
dom/tests/mochitest/bugs/test_sizetocontent_clamp.html
dom/tests/mochitest/dom-level0/iframe1_location_setters.html
dom/tests/mochitest/dom-level0/iframe2_location_setters.html
dom/tests/mochitest/dom-level0/iframe3_location_setters.html
dom/tests/mochitest/dom-level0/mochitest.ini
dom/tests/mochitest/dom-level0/test_location_setters.html
dom/tests/mochitest/general/historyframes.html
dom/tests/mochitest/general/mochitest.ini
dom/tests/mochitest/general/start_historyframe.html
dom/tests/mochitest/general/url1_historyframe.html
dom/tests/mochitest/general/url2_historyframe.html
dom/xbl/test/file_bug310107.html
dom/xbl/test/mochitest.ini
dom/xbl/test/test_bug310107.html
dom/xml/test/file_bug691215.xml
dom/xml/test/mochitest.ini
dom/xml/test/test_bug691215.html
new file mode 100644
--- /dev/null
+++ b/dom/base/test/file1_setting_opener.html
@@ -0,0 +1,1 @@
+<script>opener.setTimeout(opener.basicOpenerTest, 0, this)</script>
new file mode 100644
--- /dev/null
+++ b/dom/base/test/file2_setting_opener.html
@@ -0,0 +1,1 @@
+<script>opener.setTimeout(opener.continueOpenerTest, 0, this);</script>
new file mode 100644
--- /dev/null
+++ b/dom/base/test/file3_setting_opener.html
@@ -0,0 +1,1 @@
+<script>opener.setTimeout(opener.continueOpenerTest2, 0, this);</script>
new file mode 100644
--- /dev/null
+++ b/dom/base/test/file4_setting_opener.html
@@ -0,0 +1,1 @@
+Loaded
--- a/dom/base/test/file_bug426646-1.html
+++ b/dom/base/test/file_bug426646-1.html
@@ -1,26 +1,27 @@
 <html><head>
 <title>Bug 426646, Using location.replace breaks iframe history</title>
 <script type="text/javascript">
-var url1 = "data:text/html;charset=utf-8,1st%20page";
+var BASE_URI = "http://mochi.test:8888/tests/dom/base/test/";
+var url1 = BASE_URI + "iframe1_bug426646.html";
 
 function soon(f) {
   return function() { setTimeout(f, 0); };
 }
 
 function doe() {
   document.body.innerHTML = "<iframe src='about:blank'></iframe>";
   document.body.innerHTML += "<iframe src='about:blank'></iframe>";
   window.frames[0].frameElement.onload = soon(doe2);
   window.frames[0].location.replace(url1);
 }
 
 function doe2() {
-  window.frames[0].location = 'data:text/html;charset=utf-8,2nd%20page';
+  window.frames[0].location = 'iframe2_bug426646.html';
   window.frames[0].frameElement.onload = soon(doe3);
 }
 
 function doe3() {
   window.frames[0].frameElement.onload = soon(doe4);
   history.go(-1);
 }
 
--- a/dom/base/test/file_bug426646-2.html
+++ b/dom/base/test/file_bug426646-2.html
@@ -1,12 +1,13 @@
 <html><head>
 <title>Bug 426646, Using location.replace breaks iframe history</title>
 <script type="text/javascript">
-var url1 = "data:text/html;charset=utf-8,1st%20page";
+var BASE_URI = "http://mochi.test:8888/tests/dom/base/test/";
+var url1 = BASE_URI + "iframe1_bug426646.html";
 
 var win0 = null;
 
 function soon(f) {
   return function() { setTimeout(f, 0); };
 }
 
 function doe() {
@@ -41,17 +42,17 @@ function doe3() {
     return;
   }
   if (doe3_count > 3) {
     ok(false, 'Unexpected ' + doe3_count + 'th call to doe3.');
     return;
   }
 
   win0.frameElement.onload = soon(doe4);
-  win0.location = 'data:text/html;charset=utf-8,2nd%20page';
+  win0.location = BASE_URI + 'iframe2_bug426646.html';
 }
 
 function doe4() {
   win0.frameElement.onload = soon(doe5);
   history.go(-1);
 }
 
 function doe5() {
new file mode 100644
--- /dev/null
+++ b/dom/base/test/file_bug753278.html
@@ -0,0 +1,1 @@
+<meta charset="utf-8"><script>parent.pass();</script>
new file mode 100644
--- /dev/null
+++ b/dom/base/test/iframe1_bug426646.html
@@ -0,0 +1,1 @@
+<html><meta charset="utf-8">1st page</html>
new file mode 100644
--- /dev/null
+++ b/dom/base/test/iframe2_bug426646.html
@@ -0,0 +1,1 @@
+<html><meta charset="utf-8">2nd page</html>
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -110,16 +110,17 @@ support-files =
   file_bug704320_preload_reuse.html
   file_bug704320_preload_noreuse.html
   file_bug704320_redirect.html
   file_bug707142_baseline.json
   file_bug707142_bom.json
   file_bug707142_utf-16.json
   file_bug708620-2.html
   file_bug708620.html
+  file_bug753278.html
   file_bug769117.html
   file_bug782342.txt
   file_bug787778.sjs
   file_bug804395.jar
   file_bug869432.eventsource
   file_bug869432.eventsource^headers^
   file_bug907892.html
   file_bug945152.jar
@@ -232,16 +233,22 @@ support-files =
   object_bug455472.html
   iframe1_bug431701.html
   iframe2_bug431701.html
   iframe3_bug431701.html
   iframe4_bug431701.xml
   iframe5_bug431701.xml
   iframe6_bug431701.xml
   iframe7_bug431701.xml
+  iframe1_bug426646.html
+  iframe2_bug426646.html
+  file1_setting_opener.html
+  file2_setting_opener.html
+  file3_setting_opener.html
+  file4_setting_opener.html
 
 [test_anchor_area_referrer.html]
 [test_anchor_area_referrer_changing.html]
 [test_anchor_area_referrer_invalid.html]
 [test_anchor_area_referrer_rel.html]
 [test_anonymousContent_api.html]
 [test_anonymousContent_append_after_reflow.html]
 [test_anonymousContent_canvas.html]
--- a/dom/base/test/test_bug753278.html
+++ b/dom/base/test/test_bug753278.html
@@ -21,17 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 753278 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var f = document.getElementsByTagName("iframe")[0];
 
 function runTest() {
   f.contentDocument.open();
-  f.contentDocument.write('<script>window.location = "data:text/html;charset=utf-8,\\u003Cscript>parent.pass();\\u003C/script>"; document.close(); document.open(); document.write("\\u003Cscript>parent.fail();\\u003C/script>"); document.close();\u003c/script>');
+  f.contentDocument.write('<script>window.location = "file_bug753278.html"; document.close(); document.open(); document.write("\\u003Cscript>parent.fail();\\u003C/script>"); document.close();\u003c/script>');
   f.contentDocument.close();
 }
 
 function pass() {
   ok(true, "window.location took precedence");
   SimpleTest.finish();
 }
 
--- a/dom/base/test/test_setting_opener.html
+++ b/dom/base/test/test_setting_opener.html
@@ -13,17 +13,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   /** Test for Bug 868996 **/
   SimpleTest.waitForExplicitFinish();
 
   var sb1, sb2;
   var Cu = SpecialPowers.Cu;
   
   function testOpenerSet() {
     // Use setTimeout to make the relevant onerror run in this window
-    var win = window.open("data:text/html,<script>opener.setTimeout(opener.basicOpenerTest, 0, this)</" + "script>");
+    var win = window.open("file1_setting_opener.html");
     // A sandbox for the window
     sb1 = new Cu.Sandbox(win, {wantXrays: true })
     sb1.win = win
     // And a sandbox using the expanded principal.
     sb2 = new Cu.Sandbox([win], {wantXrays: true })
     sb2.win = win
   }
 
@@ -44,17 +44,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     evalsb("win.opener = win.opener.document.getElementById('z').contentWindow", sb2);
 
     is(win.opener, $("x").contentWindow, "Should be able to set an opener to a different window");
     is(evalsb("win.opener", sb1), $("y").contentWindow,
        "Should be able to set the opener to a different window in a sandbox one");
     is(evalsb("win.opener", sb2), $("z").contentWindow,
        "Should be able to set the opener to a different window in a sandbox two");
 
-    win.location = "data:text/html,<script>opener.setTimeout(opener.continueOpenerTest, 0, this);</" + "script>";
+    win.location = "file2_setting_opener.html";
   }
 
   function continueOpenerTest(win) {
     is(win.opener, window, "Navigating a window should have reset the opener we stashed on it temporarily");
     is(evalsb("win.opener", sb1), window,
        "Navigating a window should have reset the opener in sb1");
     is(evalsb("win.opener", sb2), window,
        "Navigating a window should have reset the opener in sb2");
@@ -62,17 +62,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     win.opener = 5;
     evalsb("win.opener = 5", sb1);
     evalsb("win.opener = 5", sb2);
     is(win.opener, 5, "Should be able to set an opener to a primitive");
     is(evalsb("win.opener", sb1), 5,
        "Should be able to set the opener to a primitive in a sandbox one");
     is(evalsb("win.opener", sb2), 5,
        "Should be able to set the opener to a primitive in a sandbox two");
-    win.location = "data:text/html,<script>opener.setTimeout(opener.continueOpenerTest2, 0, this);</" + "script>";
+    win.location = "file3_setting_opener.html";
   }
 
   function continueOpenerTest2(win) {
     is(win.opener, window,
        "Navigating a window again should have reset the opener we stashed on it temporarily");
     is(evalsb("win.opener", sb1), window,
        "Navigating a window again should have reset the opener in sb1");
     is(evalsb("win.opener", sb2), window,
@@ -80,25 +80,25 @@ https://bugzilla.mozilla.org/show_bug.cg
 
     win.opener = null;
     is(win.opener, null, "Should be able to set the opener to null");
     is(evalsb("win.opener", sb1), null,
        "Setting the opener to null should be visible in sb1");
     is(evalsb("win.opener", sb2), null,
        "Setting the opener to null should be visible in sb2");
 
-    win.location = "data:text/html,Loaded";
+    win.location = "file4_setting_opener.html";
     // Now poll for that load, since we have no way for the window to
     // communicate with us now
     setTimeout(checkForLoad, 0, win);
   }
 
   function checkForLoad(win) {
     if (!win.document.documentElement ||
-        win.document.documentElement.textContent != "Loaded") {
+        win.document.documentElement.innerText != "Loaded") {
       setTimeout(checkForLoad, 0, win);
       return;
     }
 
     is(win.opener, null, "Null opener should persist across navigations");
     is(evalsb("win.opener", sb1), null,
        "Null opener should persist across navigations in sb1");
     is(evalsb("win.opener", sb2), null,
--- a/dom/broadcastchannel/tests/mochitest.ini
+++ b/dom/broadcastchannel/tests/mochitest.ini
@@ -4,16 +4,18 @@ support-files =
   broadcastchannel_sharedWorker.js
   broadcastchannel_worker.js
   broadcastchannel_worker_alive.js
   broadcastchannel_worker_any.js
   file_mozbrowser.html
   file_mozbrowser2.html
   iframe_mozbrowser.html
   iframe_mozbrowser2.html
+  testUrl1_bfcache.html
+  testUrl2_bfcache.html
 
 [test_broadcastchannel_any.html]
 [test_broadcastchannel_basic.html]
 [test_broadcastchannel_close.html]
 [test_broadcastchannel_close2.html]
 [test_broadcastchannel_self.html]
 [test_broadcastchannel_sharedWorker.html]
 [test_broadcastchannel_worker.html]
new file mode 100644
--- /dev/null
+++ b/dom/broadcastchannel/tests/testUrl1_bfcache.html
@@ -0,0 +1,1 @@
+<script>onpageshow = function(e) { opener.page1Shown(e); };</script>
new file mode 100644
--- /dev/null
+++ b/dom/broadcastchannel/tests/testUrl2_bfcache.html
@@ -0,0 +1,1 @@
+<script>onpageshow = function(e) { opener.page2Shown(e); };</script>
--- a/dom/broadcastchannel/tests/test_bfcache.html
+++ b/dom/broadcastchannel/tests/test_bfcache.html
@@ -20,18 +20,18 @@
    * - page2Shown is called by testUrl2.
    * - Based on expectedPersisted we use or not the BroadcastChannel object of
    *   testUrl1.
    * - Then we call history.back() and testUrl1 will be loaded again.
    * - when page1Shown is called by testUrl1, if BroadcastChannel has been used
    *   when testUrl2 was shown, we want event.persisted be false, otherwise
    *   true.
    */
-  var testUrl1 = "data:text/html,<script>onpageshow = function(e) { opener.page1Shown(e); };<" + "/script>";
-  var testUrl2 = "data:text/html,<script>onpageshow = function(e) { opener.page2Shown(e); };<" + "/script>";
+  var testUrl1 = "testUrl1_bfcache.html";
+  var testUrl2 = "testUrl2_bfcache.html";
 
   var testWin;
   var counter = 0;
   var expectedPersisted = false;
   var bc;
 
   function page1Shown(e) {
     info("Page1Shown: " + testWin.location.href);
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/file1_bug414291.html
@@ -0,0 +1,1 @@
+<html><body onload='close(); opener.result0 = 1;'>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/file1_bug437361.html
@@ -0,0 +1,1 @@
+<html><body onload='close(); returnValue = 1;' /></html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/file2_bug414291.html
@@ -0,0 +1,1 @@
+<html><body onload='close(); opener.result2 = 2;'>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/file2_bug437361.html
@@ -0,0 +1,1 @@
+<html><body onload='close(); returnValue = 1;' /></html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/file2_bug504862.html
@@ -0,0 +1,1 @@
+<html><body onload="opener.is(window.dialogArguments, 'my args', 'subsequent dialog document did not get the right arguments.'); close();"></html>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/file3_bug414291.html
@@ -0,0 +1,1 @@
+<html><body onload='close(); returnValue = 3;'>
--- a/dom/tests/mochitest/bugs/file_bug504862.html
+++ b/dom/tests/mochitest/bugs/file_bug504862.html
@@ -4,17 +4,17 @@
 window.returnValue = 3;
 
 if (location.toString().match(/^http:\/\/mochi.test:8888/)) {
   // Test that we got the right arguments.
   opener.is(window.dialogArguments, "my args",
             "dialog did not get the right arguments.");
 
   // Load a different url, and test that it sees the arguments (since it's same origin).
-  window.location="data:text/html,<html><body onload=\"opener.is(window.dialogArguments, 'my args', 'subsequent dialog document did not get the right arguments.'); close();\">';";
+  window.location="file2_bug504862.html";
 } else {
   // Post a message containing our arguments to the opener to test
   // that this cross origing dialog does *not* see the passed in
   // arguments.
   opener.postMessage("args: " + window.dialogArguments,
                      "http://mochi.test:8888");
 
   close();
--- a/dom/tests/mochitest/bugs/mochitest.ini
+++ b/dom/tests/mochitest/bugs/mochitest.ini
@@ -8,16 +8,17 @@ support-files =
   bug346659-parent.html
   bug458091_child.html
   child_bug260264.html
   devicemotion_inner.html
   devicemotion_outer.html
   file_bug291653.html
   file_bug406375.html
   file_bug504862.html
+  file2_bug504862.html
   file_bug593174_1.html
   file_bug593174_2.html
   file_bug809290_b1.html
   file_bug809290_b2.html
   file_bug809290_c.html
   file_empty.html
   file_window_bar.html
   grandchild_bug260264.html
@@ -32,16 +33,25 @@ support-files =
   iframe_domparser_after_blank.html
   utils_bug260264.js
   utils_bug743615.js
   worker_bug743615.js
   file_bug927901.html
   file_cookieOutputter.html
   file_redirector.sjs
   file_prime_cookie.html
+  test1_bug369306.html
+  test2_bug369306.html
+  test1_bug622361.html
+  test2_bug622361.html
+  file1_bug414291.html
+  file2_bug414291.html
+  file3_bug414291.html
+  file1_bug437361.html
+  file2_bug437361.html
 
 [test_DOMWindowCreated_chromeonly.html]
 [test_bug132255.html]
 [test_bug159849.html]
 [test_bug289714.html]
 [test_bug260264.html]
 skip-if = toolkit == 'android'
 [test_bug260264_nested.html]
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/test1_bug369306.html
@@ -0,0 +1,1 @@
+<script>opener.focus();</script>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/test1_bug622361.html
@@ -0,0 +1,1 @@
+1
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/test2_bug369306.html
@@ -0,0 +1,1 @@
+<script>blur();</script>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/bugs/test2_bug622361.html
@@ -0,0 +1,1 @@
+2
--- a/dom/tests/mochitest/bugs/test_bug369306.html
+++ b/dom/tests/mochitest/bugs/test_bug369306.html
@@ -84,22 +84,22 @@ function test1()
 
 function test2()
 {
   focusShouldNotChange(function () { originatingWindow.focus(); }, test3);
 }
 
 function test3()
 {
-  focusShouldNotChange2("data:text/html,\<script>opener.focus();\<\/script>", test4);
+  focusShouldNotChange2("test1_bug369306.html", test4);
 }
 
 function test4()
 {
-  focusShouldNotChange2("data:text/html,\<script>blur();\<\/script>", test5);
+  focusShouldNotChange2("test2_bug369306.html", test5);
 }
 
 function test5()
 {
   var w = window.open('about:blank', '', 'foo');
 
   SimpleTest.waitForFocus(function () {
     SimpleTest.waitForFocus(function () {
--- a/dom/tests/mochitest/bugs/test_bug414291.html
+++ b/dom/tests/mochitest/bugs/test_bug414291.html
@@ -13,23 +13,23 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 414291 **/
 
 var result1 = 0;
 var result2 = 0;
 var result3 = 0;
 
-window.open("data:text/html,<html><body onload='close(); opener.result1 = 1;'>", "w1");
+window.open("file1_bug414291.html", "w1");
 is(result1, 0, "window should not be opened either as modal or loaded synchronously.");
 
-window.open("data:text/html,<html><body onload='close(); opener.result2 = 2;'>", "w2", "modal=yes");
+window.open("file2_bug414291.html", "w2", "modal=yes");
 is(result2, 0, "window should not be opened either as modal or data loaded synchronously.");
 
 if (window.showModalDialog) {
-  result3 = window.showModalDialog("data:text/html,<html><body onload='close(); returnValue = 3;'>");
+  result3 = window.showModalDialog("file3_bug414291.html");
   is(result3, 3, "window should be opened as modal.");
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/tests/mochitest/bugs/test_bug437361.html
+++ b/dom/tests/mochitest/bugs/test_bug437361.html
@@ -10,24 +10,24 @@ https://bugzilla.mozilla.org/show_bug.cg
   
   <script class="testbody" type="text/javascript">
 
   /** Test for Bug 437361 **/
 
   function testModalDialogBlockedCleanly() {
     is(true, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check");
     var rv = window.showModalDialog( // should be blocked without exception
-      "data:text/html,<html><body onload='close(); returnValue = 1;' /></html>");
+      "file1_bug437361.html");
     is(rv, null, "Modal dialog opened unexpectedly.");
   }
   
   function testModalDialogAllowed() {
     is(false, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check");
     var rv = window.showModalDialog( // should not be blocked this time
-      "data:text/html,<html><body onload='close(); returnValue = 1;' /></html>");
+      "file2_bug437361.html");
     is(rv, 1, "Problem with modal dialog returnValue.");
   }
 
   function testOtherExceptionsNotTrapped() {
     is(false, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check");
     window.showModalDialog('about:config'); // forbidden by SecurityCheckURL
   }
 
--- a/dom/tests/mochitest/bugs/test_bug622361.html
+++ b/dom/tests/mochitest/bugs/test_bug622361.html
@@ -14,21 +14,21 @@ function doNext()
   postMessage("ohai", "*");
 }
 
 function boom(event)
 {
   switch (counter)
   {
   case 1:
-    w = window.open("data:text/html,1");
+    w = window.open("test1_bug622361.html");
     doNext();
     return;
   case 2:
-    w.location = "data:text/html,2";
+    w.location = "test2_bug622361.html";
     function next()
     {
       w.history.back();
       doNext();
     }
     setTimeout(next, 5000);
     return;
   case 3:
--- a/dom/tests/mochitest/bugs/test_sizetocontent_clamp.html
+++ b/dom/tests/mochitest/bugs/test_sizetocontent_clamp.html
@@ -33,17 +33,17 @@ var epsilon =  navigator.platform.indexO
 var isWin8 = (navigator.userAgent.indexOf("Windows NT 6.2") != -1);
 
 var innerWidthMin = (isWin8 ? 120 : 100);
 var innerWidthMax = (isWin8 ? 125 : 100);
 
 var isExecuted = false;
 
 function test() {
-  var w = window.open('data:text/html,null', null, 'width=300,height=300');
+  var w = window.open('file_empty.html', null, 'width=300,height=300');
 
   SimpleTest.waitForFocus(function() {
     w.onresize = function() {
 
       if (w.innerWidth > 300 - epsilon || isExecuted) {
         return;
       }
 
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level0/iframe1_location_setters.html
@@ -0,0 +1,1 @@
+1
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level0/iframe2_location_setters.html
@@ -0,0 +1,1 @@
+2
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/dom-level0/iframe3_location_setters.html
@@ -0,0 +1,1 @@
+3
--- a/dom/tests/mochitest/dom-level0/mochitest.ini
+++ b/dom/tests/mochitest/dom-level0/mochitest.ini
@@ -1,16 +1,19 @@
 [DEFAULT]
 support-files =
   child_ip_address.html
   file_crossdomainprops_inner.html
   file_location.html
   framed_location.html
   idn_child.html
   innerWidthHeight_script.html
+  iframe1_location_setters.html
+  iframe2_location_setters.html
+  iframe3_location_setters.html
 
 [test_crossdomainprops.html]
 [test_innerWidthHeight_script.html]
 skip-if = toolkit == 'android' # Bug 1075071 - Permafail on Android
 [test_location.html]
 [test_location_framed.html]
 [test_location_getters.html]
 [test_location_sandboxed.html]
--- a/dom/tests/mochitest/dom-level0/test_location_setters.html
+++ b/dom/tests/mochitest/dom-level0/test_location_setters.html
@@ -17,22 +17,23 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 639720 **/
 SimpleTest.waitForExplicitFinish();
 
+var BASE_URI = "http://mochi.test:8888/tests/dom/tests/mochitest/dom-level0/";
 var tests = [
- { url: "data:text/plain,1" },
- { url: "data:text/plain,2",
+ { url: BASE_URI + "iframe1_location_setters.html" },
+ { url: BASE_URI + "iframe2_location_setters.html",
    useDocument: true },
  { prepURL: "http://www.example.com",
-   url: "data:text/plain,3" }
+   url: BASE_URI + "iframe3_location_setters.html" }
 ];
 
 var currentTest = 0;
 
 function checkTest() {
   is($("f").contentWindow.location.href, tests[currentTest].url,
      "href of content window's location should match url of current test");
   ++currentTest;
--- a/dom/tests/mochitest/general/historyframes.html
+++ b/dom/tests/mochitest/general/historyframes.html
@@ -4,17 +4,17 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=602256
 -->
 <head>
   <title>Test for Bug 602256</title>
 </head>
 <body onload="SimpleTest.executeSoon(run_test)">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=602256">Mozilla Bug 602256</a>
 <div id="content">
-  <iframe id="iframe" src="data:text/html,<p%20id='text'>Start</p>"></iframe>
+  <iframe id="iframe" src="start_historyframe.html"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 602256 **/
 
 var testWin = window.opener ? window.opener : window.parent;
 
@@ -47,19 +47,20 @@ function loadContent(aURL) {
 function getURL() {
   return gFrame.contentDocument.documentURI;
 }
 
 function getContent() {
   return gFrame.contentDocument.getElementById("text").textContent;
 }
 
-var START = "data:text/html,<p%20id='text'>Start</p>";
-var URL1 = "data:text/html,<p%20id='text'>Test1</p>";
-var URL2 = "data:text/html,<p%20id='text'>Test2</p>";
+var BASE_URI = "http://mochi.test:8888/tests/dom/tests/mochitest/general/";
+var START = BASE_URI + "start_historyframe.html";
+var URL1 = BASE_URI + "url1_historyframe.html";
+var URL2 = BASE_URI + "url2_historyframe.html";
 
 function run_test() {
   window.history.pushState("START", window.location);
 
   gFrame = document.getElementById("iframe");
 
   continue_test();
 }
--- a/dom/tests/mochitest/general/mochitest.ini
+++ b/dom/tests/mochitest/general/mochitest.ini
@@ -6,16 +6,19 @@ support-files =
   file_clonewrapper.html
   file_domWindowUtils_scrollbarSize.html
   file_frameElementWrapping.html
   file_interfaces.xml
   file_moving_nodeList.html
   file_moving_xhr.html
   file_showModalDialog.html
   historyframes.html
+  start_historyframe.html
+  url1_historyframe.html
+  url2_historyframe.html
   image_50.png
   image_100.png
   image_200.png
   pass.apng
   performance_timeline_main_test.html
   resource_timing_iframe.html
   resource_timing_main_test.html
   resource_timing_cross_origin.html
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/general/start_historyframe.html
@@ -0,0 +1,1 @@
+<p id='text'>Start</p>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/general/url1_historyframe.html
@@ -0,0 +1,1 @@
+<p id='text'>Test1</p>
new file mode 100644
--- /dev/null
+++ b/dom/tests/mochitest/general/url2_historyframe.html
@@ -0,0 +1,1 @@
+<p id='text'>Test2</p>
new file mode 100644
--- /dev/null
+++ b/dom/xbl/test/file_bug310107.html
@@ -0,0 +1,1 @@
+<body onload='window.opener.loadDone()'>
--- a/dom/xbl/test/mochitest.ini
+++ b/dom/xbl/test/mochitest.ini
@@ -1,11 +1,12 @@
 [DEFAULT]
 support-files =
   bug310107-resource.xhtml
+  file_bug310107.html
   file_bug372769.xhtml
   file_bug379959_cross.html
   file_bug379959_data.html
   file_bug379959_xbl.xml
   file_bug397934.xhtml
   file_bug481558.xbl
   file_bug481558css.sjs
   file_bug591198_inner.html
@@ -34,9 +35,9 @@ support-files =
 [test_bug591198.html]
 [test_bug639338.xhtml]
 [test_bug790265.xhtml]
 [test_bug821850.html]
 [test_bug844783.html]
 [test_bug872273.xhtml]
 [test_bug1086996.xhtml]
 [test_bug1098628_throw_from_construct.xhtml]
-[test_bug1359859.xhtml]
\ No newline at end of file
+[test_bug1359859.xhtml]
--- a/dom/xbl/test/test_bug310107.html
+++ b/dom/xbl/test/test_bug310107.html
@@ -21,17 +21,17 @@ SimpleTest.waitForExplicitFinish();
 
 var win = window.open("bug310107-resource.xhtml", "", "width=10, height=10");
 
 function runTest() {
   window.el = win.document.getElementById("bar");
   window.doc = win.document;
   is(window.el.prop, 2, "Unexpected prop value at load");
 
-  win.location = "data:text/html,<body onload='window.opener.loadDone()'>";
+  win.location = "file_bug310107.html";
 }
 
 function loadDone() {
   is(window.el.prop, 2, "Prop still 2 because we're in bfcache");
   is(window.el, window.doc.getElementById("bar"),
      "document didn't get bfcached?");
 
   // Remove our node from the DOM
new file mode 100644
--- /dev/null
+++ b/dom/xml/test/file_bug691215.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root/>
--- a/dom/xml/test/mochitest.ini
+++ b/dom/xml/test/mochitest.ini
@@ -1,13 +1,14 @@
 [DEFAULT]
 support-files =
   file_bug293347.xml
   file_bug293347xslt.xml
   file_bug392338.js
+  file_bug691215.xml
 
 [test_bug232004.xhtml]
 [test_bug293347.html]
 [test_bug343870.xhtml]
 [test_bug355213.xhtml]
 [test_bug392338.html]
 [test_bug399502.xhtml]
 [test_bug445330.html]
--- a/dom/xml/test/test_bug691215.html
+++ b/dom/xml/test/test_bug691215.html
@@ -16,17 +16,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 691215 **/
 
 SimpleTest.waitForExplicitFinish();
 
-var url = "data:text/xml,<root/>";
+var BASE_URI = "http://mochi.test:8888/tests/dom/xml/test/";
+var url = BASE_URI + "file_bug691215.xml";
 var w;
 
 addLoadEvent(function() {
   // Need a separate window because we do not prettyprint in iframes.  This is
   // why this test can't be a crashtest.
   w = window.open(url);
   // Need to poll for load completion, sadly
   setTimeout(checker, 0);