Bug 1417383 - Move mochitests from docshell/test/ to docshell/test/mochitest/ to aid ESLint. r=qdot
authorMark Banner <standard8@mozilla.com>
Tue, 02 Oct 2018 07:45:54 +0000
changeset 487507 3367b2fb277193c9f12f02487587345f2ba5cc64
parent 487506 a3269d08cf46cc87e8b345ac10a67ff12c550f35
child 487508 cd7aa09c2b6231c821d489496b6f1a928c28ae98
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersqdot
bugs1417383
milestone64.0a1
Bug 1417383 - Move mochitests from docshell/test/ to docshell/test/mochitest/ to aid ESLint. r=qdot Depends on D7052 Differential Revision: https://phabricator.services.mozilla.com/D7053
docshell/moz.build
docshell/test/bug123696-subframe.html
docshell/test/bug404548-subframe.html
docshell/test/bug404548-subframe_window.html
docshell/test/bug413310-post.sjs
docshell/test/bug413310-subframe.html
docshell/test/bug529119-window.html
docshell/test/bug530396-noref.sjs
docshell/test/bug530396-subframe.html
docshell/test/bug570341_recordevents.html
docshell/test/bug668513_redirect.html
docshell/test/bug668513_redirect.html^headers^
docshell/test/bug691547_frame.html
docshell/test/dummy_page.html
docshell/test/file_anchor_scroll_after_document_open.html
docshell/test/file_bfcache_plus_hash_1.html
docshell/test/file_bfcache_plus_hash_2.html
docshell/test/file_bug1121701_1.html
docshell/test/file_bug1121701_2.html
docshell/test/file_bug1151421.html
docshell/test/file_bug1186774.html
docshell/test/file_bug1450164.html
docshell/test/file_bug385434_1.html
docshell/test/file_bug385434_2.html
docshell/test/file_bug385434_3.html
docshell/test/file_bug475636.sjs
docshell/test/file_bug509055.html
docshell/test/file_bug511449.html
docshell/test/file_bug540462.html
docshell/test/file_bug580069_1.html
docshell/test/file_bug580069_2.sjs
docshell/test/file_bug590573_1.html
docshell/test/file_bug590573_2.html
docshell/test/file_bug598895_1.html
docshell/test/file_bug598895_2.html
docshell/test/file_bug634834.html
docshell/test/file_bug637644_1.html
docshell/test/file_bug637644_2.html
docshell/test/file_bug640387.html
docshell/test/file_bug653741.html
docshell/test/file_bug660404
docshell/test/file_bug660404-1.html
docshell/test/file_bug660404^headers^
docshell/test/file_bug662170.html
docshell/test/file_bug668513.html
docshell/test/file_bug669671.sjs
docshell/test/file_bug675587.html
docshell/test/file_bug680257.html
docshell/test/file_bug703855.html
docshell/test/file_bug728939.html
docshell/test/file_close_onpagehide1.html
docshell/test/file_close_onpagehide2.html
docshell/test/file_framedhistoryframes.html
docshell/test/file_pushState_after_document_open.html
docshell/test/historyframes.html
docshell/test/mochitest.ini
docshell/test/mochitest/bug123696-subframe.html
docshell/test/mochitest/bug404548-subframe.html
docshell/test/mochitest/bug404548-subframe_window.html
docshell/test/mochitest/bug413310-post.sjs
docshell/test/mochitest/bug413310-subframe.html
docshell/test/mochitest/bug529119-window.html
docshell/test/mochitest/bug530396-noref.sjs
docshell/test/mochitest/bug530396-subframe.html
docshell/test/mochitest/bug570341_recordevents.html
docshell/test/mochitest/bug668513_redirect.html
docshell/test/mochitest/bug668513_redirect.html^headers^
docshell/test/mochitest/bug691547_frame.html
docshell/test/mochitest/dummy_page.html
docshell/test/mochitest/file_anchor_scroll_after_document_open.html
docshell/test/mochitest/file_bfcache_plus_hash_1.html
docshell/test/mochitest/file_bfcache_plus_hash_2.html
docshell/test/mochitest/file_bug1121701_1.html
docshell/test/mochitest/file_bug1121701_2.html
docshell/test/mochitest/file_bug1151421.html
docshell/test/mochitest/file_bug1186774.html
docshell/test/mochitest/file_bug1450164.html
docshell/test/mochitest/file_bug385434_1.html
docshell/test/mochitest/file_bug385434_2.html
docshell/test/mochitest/file_bug385434_3.html
docshell/test/mochitest/file_bug475636.sjs
docshell/test/mochitest/file_bug509055.html
docshell/test/mochitest/file_bug511449.html
docshell/test/mochitest/file_bug540462.html
docshell/test/mochitest/file_bug580069_1.html
docshell/test/mochitest/file_bug580069_2.sjs
docshell/test/mochitest/file_bug590573_1.html
docshell/test/mochitest/file_bug590573_2.html
docshell/test/mochitest/file_bug598895_1.html
docshell/test/mochitest/file_bug598895_2.html
docshell/test/mochitest/file_bug634834.html
docshell/test/mochitest/file_bug637644_1.html
docshell/test/mochitest/file_bug637644_2.html
docshell/test/mochitest/file_bug640387.html
docshell/test/mochitest/file_bug653741.html
docshell/test/mochitest/file_bug660404
docshell/test/mochitest/file_bug660404-1.html
docshell/test/mochitest/file_bug660404^headers^
docshell/test/mochitest/file_bug662170.html
docshell/test/mochitest/file_bug668513.html
docshell/test/mochitest/file_bug669671.sjs
docshell/test/mochitest/file_bug675587.html
docshell/test/mochitest/file_bug680257.html
docshell/test/mochitest/file_bug703855.html
docshell/test/mochitest/file_bug728939.html
docshell/test/mochitest/file_close_onpagehide1.html
docshell/test/mochitest/file_close_onpagehide2.html
docshell/test/mochitest/file_framedhistoryframes.html
docshell/test/mochitest/file_pushState_after_document_open.html
docshell/test/mochitest/historyframes.html
docshell/test/mochitest/mochitest.ini
docshell/test/mochitest/start_historyframe.html
docshell/test/mochitest/test_anchor_scroll_after_document_open.html
docshell/test/mochitest/test_bfcache_plus_hash.html
docshell/test/mochitest/test_bug1045096.html
docshell/test/mochitest/test_bug1121701.html
docshell/test/mochitest/test_bug1151421.html
docshell/test/mochitest/test_bug1186774.html
docshell/test/mochitest/test_bug123696.html
docshell/test/mochitest/test_bug1450164.html
docshell/test/mochitest/test_bug384014.html
docshell/test/mochitest/test_bug385434.html
docshell/test/mochitest/test_bug387979.html
docshell/test/mochitest/test_bug402210.html
docshell/test/mochitest/test_bug404548.html
docshell/test/mochitest/test_bug413310.html
docshell/test/mochitest/test_bug475636.html
docshell/test/mochitest/test_bug509055.html
docshell/test/mochitest/test_bug511449.html
docshell/test/mochitest/test_bug529119-1.html
docshell/test/mochitest/test_bug529119-2.html
docshell/test/mochitest/test_bug530396.html
docshell/test/mochitest/test_bug540462.html
docshell/test/mochitest/test_bug551225.html
docshell/test/mochitest/test_bug570341.html
docshell/test/mochitest/test_bug580069.html
docshell/test/mochitest/test_bug590573.html
docshell/test/mochitest/test_bug598895.html
docshell/test/mochitest/test_bug634834.html
docshell/test/mochitest/test_bug637644.html
docshell/test/mochitest/test_bug640387_1.html
docshell/test/mochitest/test_bug640387_2.html
docshell/test/mochitest/test_bug653741.html
docshell/test/mochitest/test_bug660404.html
docshell/test/mochitest/test_bug662170.html
docshell/test/mochitest/test_bug668513.html
docshell/test/mochitest/test_bug669671.html
docshell/test/mochitest/test_bug675587.html
docshell/test/mochitest/test_bug680257.html
docshell/test/mochitest/test_bug691547.html
docshell/test/mochitest/test_bug694612.html
docshell/test/mochitest/test_bug703855.html
docshell/test/mochitest/test_bug728939.html
docshell/test/mochitest/test_bug797909.html
docshell/test/mochitest/test_close_onpagehide_by_history_back.html
docshell/test/mochitest/test_close_onpagehide_by_window_close.html
docshell/test/mochitest/test_forceinheritprincipal_overrule_owner.html
docshell/test/mochitest/test_framedhistoryframes.html
docshell/test/mochitest/test_pushState_after_document_open.html
docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
docshell/test/mochitest/test_windowedhistoryframes.html
docshell/test/mochitest/url1_historyframe.html
docshell/test/mochitest/url2_historyframe.html
docshell/test/moz.build
docshell/test/start_historyframe.html
docshell/test/test_anchor_scroll_after_document_open.html
docshell/test/test_bfcache_plus_hash.html
docshell/test/test_bug1045096.html
docshell/test/test_bug1121701.html
docshell/test/test_bug1151421.html
docshell/test/test_bug1186774.html
docshell/test/test_bug123696.html
docshell/test/test_bug1450164.html
docshell/test/test_bug384014.html
docshell/test/test_bug385434.html
docshell/test/test_bug387979.html
docshell/test/test_bug402210.html
docshell/test/test_bug404548.html
docshell/test/test_bug413310.html
docshell/test/test_bug475636.html
docshell/test/test_bug509055.html
docshell/test/test_bug511449.html
docshell/test/test_bug529119-1.html
docshell/test/test_bug529119-2.html
docshell/test/test_bug530396.html
docshell/test/test_bug540462.html
docshell/test/test_bug551225.html
docshell/test/test_bug570341.html
docshell/test/test_bug580069.html
docshell/test/test_bug590573.html
docshell/test/test_bug598895.html
docshell/test/test_bug634834.html
docshell/test/test_bug637644.html
docshell/test/test_bug640387_1.html
docshell/test/test_bug640387_2.html
docshell/test/test_bug653741.html
docshell/test/test_bug660404.html
docshell/test/test_bug662170.html
docshell/test/test_bug668513.html
docshell/test/test_bug669671.html
docshell/test/test_bug675587.html
docshell/test/test_bug680257.html
docshell/test/test_bug691547.html
docshell/test/test_bug694612.html
docshell/test/test_bug703855.html
docshell/test/test_bug728939.html
docshell/test/test_bug797909.html
docshell/test/test_close_onpagehide_by_history_back.html
docshell/test/test_close_onpagehide_by_window_close.html
docshell/test/test_forceinheritprincipal_overrule_owner.html
docshell/test/test_framedhistoryframes.html
docshell/test/test_pushState_after_document_open.html
docshell/test/test_triggeringprincipal_location_seturi.html
docshell/test/test_windowedhistoryframes.html
docshell/test/url1_historyframe.html
docshell/test/url2_historyframe.html
--- a/docshell/moz.build
+++ b/docshell/moz.build
@@ -16,17 +16,17 @@ DIRS += [
 
 XPCSHELL_TESTS_MANIFESTS += [
     'test/unit/xpcshell.ini',
     'test/unit_ipc/xpcshell.ini',
 ]
 
 MOCHITEST_MANIFESTS += [
     'test/iframesandbox/mochitest.ini',
-    'test/mochitest.ini',
+    'test/mochitest/mochitest.ini',
     'test/navigation/mochitest.ini',
 ]
 
 MOCHITEST_CHROME_MANIFESTS += [
     'test/chrome/chrome.ini',
 ]
 
 BROWSER_CHROME_MANIFESTS += [
deleted file mode 100644
--- a/docshell/test/file_bug637644_1.html
+++ /dev/null
@@ -1,1 +0,0 @@
-<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body>Should show</body>
deleted file mode 100644
--- a/docshell/test/file_bug637644_2.html
+++ /dev/null
@@ -1,1 +0,0 @@
-<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body></body>
deleted file mode 100644
--- a/docshell/test/file_bug662170.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<html>
-<body onload='(parent || opener).childLoad()'>
-
-<div style='height:500px; background:yellow'>
-<a id='#top'>Top of the page</a>
-</div>
-
-<div id='bottom'>
-<a id='#bottom'>Bottom of the page</a>
-</div>
-
-</body>
-</html>
rename from docshell/test/bug123696-subframe.html
rename to docshell/test/mochitest/bug123696-subframe.html
rename from docshell/test/bug404548-subframe.html
rename to docshell/test/mochitest/bug404548-subframe.html
rename from docshell/test/bug404548-subframe_window.html
rename to docshell/test/mochitest/bug404548-subframe_window.html
rename from docshell/test/bug413310-post.sjs
rename to docshell/test/mochitest/bug413310-post.sjs
rename from docshell/test/bug413310-subframe.html
rename to docshell/test/mochitest/bug413310-subframe.html
rename from docshell/test/bug529119-window.html
rename to docshell/test/mochitest/bug529119-window.html
rename from docshell/test/bug530396-noref.sjs
rename to docshell/test/mochitest/bug530396-noref.sjs
rename from docshell/test/bug530396-subframe.html
rename to docshell/test/mochitest/bug530396-subframe.html
rename from docshell/test/bug570341_recordevents.html
rename to docshell/test/mochitest/bug570341_recordevents.html
rename from docshell/test/bug668513_redirect.html
rename to docshell/test/mochitest/bug668513_redirect.html
rename from docshell/test/bug668513_redirect.html^headers^
rename to docshell/test/mochitest/bug668513_redirect.html^headers^
rename from docshell/test/bug691547_frame.html
rename to docshell/test/mochitest/bug691547_frame.html
rename from docshell/test/dummy_page.html
rename to docshell/test/mochitest/dummy_page.html
rename from docshell/test/file_anchor_scroll_after_document_open.html
rename to docshell/test/mochitest/file_anchor_scroll_after_document_open.html
rename from docshell/test/file_bfcache_plus_hash_1.html
rename to docshell/test/mochitest/file_bfcache_plus_hash_1.html
rename from docshell/test/file_bfcache_plus_hash_2.html
rename to docshell/test/mochitest/file_bfcache_plus_hash_2.html
rename from docshell/test/file_bug1121701_1.html
rename to docshell/test/mochitest/file_bug1121701_1.html
rename from docshell/test/file_bug1121701_2.html
rename to docshell/test/mochitest/file_bug1121701_2.html
rename from docshell/test/file_bug1151421.html
rename to docshell/test/mochitest/file_bug1151421.html
rename from docshell/test/file_bug1186774.html
rename to docshell/test/mochitest/file_bug1186774.html
rename from docshell/test/file_bug1450164.html
rename to docshell/test/mochitest/file_bug1450164.html
rename from docshell/test/file_bug385434_1.html
rename to docshell/test/mochitest/file_bug385434_1.html
rename from docshell/test/file_bug385434_2.html
rename to docshell/test/mochitest/file_bug385434_2.html
rename from docshell/test/file_bug385434_3.html
rename to docshell/test/mochitest/file_bug385434_3.html
rename from docshell/test/file_bug475636.sjs
rename to docshell/test/mochitest/file_bug475636.sjs
rename from docshell/test/file_bug509055.html
rename to docshell/test/mochitest/file_bug509055.html
rename from docshell/test/file_bug511449.html
rename to docshell/test/mochitest/file_bug511449.html
rename from docshell/test/file_bug540462.html
rename to docshell/test/mochitest/file_bug540462.html
rename from docshell/test/file_bug580069_1.html
rename to docshell/test/mochitest/file_bug580069_1.html
rename from docshell/test/file_bug580069_2.sjs
rename to docshell/test/mochitest/file_bug580069_2.sjs
rename from docshell/test/file_bug590573_1.html
rename to docshell/test/mochitest/file_bug590573_1.html
rename from docshell/test/file_bug590573_2.html
rename to docshell/test/mochitest/file_bug590573_2.html
rename from docshell/test/file_bug598895_1.html
rename to docshell/test/mochitest/file_bug598895_1.html
rename from docshell/test/file_bug598895_2.html
rename to docshell/test/mochitest/file_bug598895_2.html
rename from docshell/test/file_bug634834.html
rename to docshell/test/mochitest/file_bug634834.html
copy from docshell/test/file_bug598895_1.html
copy to docshell/test/mochitest/file_bug637644_1.html
copy from docshell/test/file_bug598895_2.html
copy to docshell/test/mochitest/file_bug637644_2.html
rename from docshell/test/file_bug640387.html
rename to docshell/test/mochitest/file_bug640387.html
rename from docshell/test/file_bug653741.html
rename to docshell/test/mochitest/file_bug653741.html
rename from docshell/test/file_bug660404
rename to docshell/test/mochitest/file_bug660404
rename from docshell/test/file_bug660404-1.html
rename to docshell/test/mochitest/file_bug660404-1.html
rename from docshell/test/file_bug660404^headers^
rename to docshell/test/mochitest/file_bug660404^headers^
copy from docshell/test/file_bug653741.html
copy to docshell/test/mochitest/file_bug662170.html
rename from docshell/test/file_bug668513.html
rename to docshell/test/mochitest/file_bug668513.html
rename from docshell/test/file_bug669671.sjs
rename to docshell/test/mochitest/file_bug669671.sjs
rename from docshell/test/file_bug675587.html
rename to docshell/test/mochitest/file_bug675587.html
rename from docshell/test/file_bug680257.html
rename to docshell/test/mochitest/file_bug680257.html
rename from docshell/test/file_bug703855.html
rename to docshell/test/mochitest/file_bug703855.html
rename from docshell/test/file_bug728939.html
rename to docshell/test/mochitest/file_bug728939.html
rename from docshell/test/file_close_onpagehide1.html
rename to docshell/test/mochitest/file_close_onpagehide1.html
rename from docshell/test/file_close_onpagehide2.html
rename to docshell/test/mochitest/file_close_onpagehide2.html
rename from docshell/test/file_framedhistoryframes.html
rename to docshell/test/mochitest/file_framedhistoryframes.html
rename from docshell/test/file_pushState_after_document_open.html
rename to docshell/test/mochitest/file_pushState_after_document_open.html
rename from docshell/test/historyframes.html
rename to docshell/test/mochitest/historyframes.html
--- a/docshell/test/historyframes.html
+++ b/docshell/test/mochitest/historyframes.html
@@ -45,17 +45,17 @@ function loadContent(aURL, aCallback) {
 function getURL() {
   return gFrame.contentDocument.documentURI;
 }
 
 function getContent() {
   return gFrame.contentDocument.getElementById("text").textContent;
 }
 
-var BASE_URI = "http://mochi.test:8888/tests/docshell/test/";
+var BASE_URI = "http://mochi.test:8888/tests/docshell/test/mochitest/";
 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.location.hash = "START";
 
   gFrame = document.getElementById("iframe");
rename from docshell/test/mochitest.ini
rename to docshell/test/mochitest/mochitest.ini
rename from docshell/test/start_historyframe.html
rename to docshell/test/mochitest/start_historyframe.html
rename from docshell/test/test_anchor_scroll_after_document_open.html
rename to docshell/test/mochitest/test_anchor_scroll_after_document_open.html
rename from docshell/test/test_bfcache_plus_hash.html
rename to docshell/test/mochitest/test_bfcache_plus_hash.html
rename from docshell/test/test_bug1045096.html
rename to docshell/test/mochitest/test_bug1045096.html
rename from docshell/test/test_bug1121701.html
rename to docshell/test/mochitest/test_bug1121701.html
rename from docshell/test/test_bug1151421.html
rename to docshell/test/mochitest/test_bug1151421.html
rename from docshell/test/test_bug1186774.html
rename to docshell/test/mochitest/test_bug1186774.html
rename from docshell/test/test_bug123696.html
rename to docshell/test/mochitest/test_bug123696.html
rename from docshell/test/test_bug1450164.html
rename to docshell/test/mochitest/test_bug1450164.html
rename from docshell/test/test_bug384014.html
rename to docshell/test/mochitest/test_bug384014.html
rename from docshell/test/test_bug385434.html
rename to docshell/test/mochitest/test_bug385434.html
rename from docshell/test/test_bug387979.html
rename to docshell/test/mochitest/test_bug387979.html
rename from docshell/test/test_bug402210.html
rename to docshell/test/mochitest/test_bug402210.html
rename from docshell/test/test_bug404548.html
rename to docshell/test/mochitest/test_bug404548.html
rename from docshell/test/test_bug413310.html
rename to docshell/test/mochitest/test_bug413310.html
rename from docshell/test/test_bug475636.html
rename to docshell/test/mochitest/test_bug475636.html
rename from docshell/test/test_bug509055.html
rename to docshell/test/mochitest/test_bug509055.html
rename from docshell/test/test_bug511449.html
rename to docshell/test/mochitest/test_bug511449.html
rename from docshell/test/test_bug529119-1.html
rename to docshell/test/mochitest/test_bug529119-1.html
--- a/docshell/test/test_bug529119-1.html
+++ b/docshell/test/mochitest/test_bug529119-1.html
@@ -1,21 +1,21 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <title>Test bug 529119</title>
-<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
 
-var workingURL = "http://mochi.test:8888/tests/docshell/test/bug529119-window.html";
+var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
 var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";
 
 var w = null;
 var phase = 0;
 var gotWrongPageOnTryAgainClick = false;
 
 function pollForPage(f, w)
 {
@@ -28,17 +28,17 @@ function pollForPage(f, w)
 
       var haveErrorPage = false;
       try {
         var title = w.document.title;
       }
       catch (ex) {
         haveErrorPage = true;
       }
-  
+
       if (iterationsLeft == 0 || haveErrorPage) {
         window.clearInterval(int);
         f(iterationsLeft > 0);
       }
     }, 100);
   }, 1000);
 }
 
@@ -46,45 +46,45 @@ function windowLoaded()
 {
   switch (phase)
   {
     case 0:
       /* 2. We have succeededfully loaded a page, now go to a faulty URL */
       window.setTimeout(function() {
         w.location.href = faultyURL;
       }, 0);
-    
+
       phase = 1;
 
       pollForPage(function(succeeded) {
         ok(succeeded, "Waiting for error page succeeded");
-        
-        /* 3. now, while we are on the error page, try to reload it, actually 
+
+        /* 3. now, while we are on the error page, try to reload it, actually
            click the "Try Again" button */
         SpecialPowers.wrap(w).location.reload();
 
         pollForPage(function(succeeded) {
           ok(succeeded, "Waiting for error page succeeded");
-          
+
           /* 4-finish, check we are still on the error page */
           is(SpecialPowers.wrap(w).location.href, faultyURL, "Is on an error page");
           isnot(SpecialPowers.wrap(w).location.href, workingURL, "Is not on the previous page");
-          is(gotWrongPageOnTryAgainClick, false, 
+          is(gotWrongPageOnTryAgainClick, false,
             "Must not get www.example.com page on reload of an error page");
           w.close();
           SimpleTest.finish();
         }, w);
       }, w);
       break;
-      
+
     case 1:
       /* 4-check, we must not get here! */
       gotWrongPageOnTryAgainClick = true;
       break;
-  }             
+  }
 }
 
 function startTest()
 {
   /* 1. load a URL that leads to an error page */
   w = window.open(workingURL);
 }
 
rename from docshell/test/test_bug529119-2.html
rename to docshell/test/mochitest/test_bug529119-2.html
--- a/docshell/test/test_bug529119-2.html
+++ b/docshell/test/mochitest/test_bug529119-2.html
@@ -1,44 +1,44 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <title>Test bug 529119</title>
-<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
 
-var workingURL = "http://mochi.test:8888/tests/docshell/test/bug529119-window.html";
+var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
 var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";
 
 var w = null;
 var phase = 0;
 var isWindowLoaded = false;
 
 function pollForPage(expectErrorPage, f, w)
 {
   // Start with polling after a delay, we might mistakenly take the current page
   // as an expected one.
   window.setTimeout(function() {
     var iterationsLeft = 200;
     var int = window.setInterval(function() {
       iterationsLeft--;
-      
+
       var haveErrorPage = false;
       try {
         var title = w.document.title;
       }
       catch (ex) {
         haveErrorPage = true;
       }
-  
+
       if (iterationsLeft == 0 || expectErrorPage == haveErrorPage) {
         window.clearInterval(int);
         f(iterationsLeft > 0);
       }
     }, 100);
   }, 1000);
 }
 
@@ -46,17 +46,17 @@ function windowLoaded()
 {
   // The code under here should only be run once
   // The test popup window workingURL was already opened
   if (isWindowLoaded)
     return;
   isWindowLoaded = true;
 
   /* 2. We have successfully loaded a page, now go to a faulty URL */
-  // XXX The test fails when we change the location synchronously 
+  // XXX The test fails when we change the location synchronously
   window.setTimeout(function() {
     w.location.href = faultyURL;
   }, 0);
 
   pollForPage(true, function(succeeded) {
     ok(succeeded, "Waiting for error page succeeded");
     /* 3. now, while we are on the error page, navigate back */
     try {
rename from docshell/test/test_bug530396.html
rename to docshell/test/mochitest/test_bug530396.html
--- a/docshell/test/test_bug530396.html
+++ b/docshell/test/mochitest/test_bug530396.html
@@ -9,17 +9,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=530396">Mozilla Bug 530396</a>
 
 <p>
 
-<iframe id="testFrame" src="http://mochi.test:8888/tests/docshell/test/bug530396-subframe.html"></iframe>
+<iframe id="testFrame" src="http://mochi.test:8888/tests/docshell/test/mochitest/bug530396-subframe.html"></iframe>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 // NOTE: If we ever make subframes do bfcache stuff, this test will need to be
 // modified accordingly!  It assumes that subframes do NOT get bfcached.
 var onloadCount = 0;
 
rename from docshell/test/test_bug540462.html
rename to docshell/test/mochitest/test_bug540462.html
rename from docshell/test/test_bug551225.html
rename to docshell/test/mochitest/test_bug551225.html
rename from docshell/test/test_bug570341.html
rename to docshell/test/mochitest/test_bug570341.html
rename from docshell/test/test_bug580069.html
rename to docshell/test/mochitest/test_bug580069.html
rename from docshell/test/test_bug590573.html
rename to docshell/test/mochitest/test_bug590573.html
rename from docshell/test/test_bug598895.html
rename to docshell/test/mochitest/test_bug598895.html
rename from docshell/test/test_bug634834.html
rename to docshell/test/mochitest/test_bug634834.html
rename from docshell/test/test_bug637644.html
rename to docshell/test/mochitest/test_bug637644.html
rename from docshell/test/test_bug640387_1.html
rename to docshell/test/mochitest/test_bug640387_1.html
rename from docshell/test/test_bug640387_2.html
rename to docshell/test/mochitest/test_bug640387_2.html
rename from docshell/test/test_bug653741.html
rename to docshell/test/mochitest/test_bug653741.html
rename from docshell/test/test_bug660404.html
rename to docshell/test/mochitest/test_bug660404.html
rename from docshell/test/test_bug662170.html
rename to docshell/test/mochitest/test_bug662170.html
rename from docshell/test/test_bug668513.html
rename to docshell/test/mochitest/test_bug668513.html
rename from docshell/test/test_bug669671.html
rename to docshell/test/mochitest/test_bug669671.html
rename from docshell/test/test_bug675587.html
rename to docshell/test/mochitest/test_bug675587.html
rename from docshell/test/test_bug680257.html
rename to docshell/test/mochitest/test_bug680257.html
rename from docshell/test/test_bug691547.html
rename to docshell/test/mochitest/test_bug691547.html
rename from docshell/test/test_bug694612.html
rename to docshell/test/mochitest/test_bug694612.html
rename from docshell/test/test_bug703855.html
rename to docshell/test/mochitest/test_bug703855.html
rename from docshell/test/test_bug728939.html
rename to docshell/test/mochitest/test_bug728939.html
rename from docshell/test/test_bug797909.html
rename to docshell/test/mochitest/test_bug797909.html
rename from docshell/test/test_close_onpagehide_by_history_back.html
rename to docshell/test/mochitest/test_close_onpagehide_by_history_back.html
rename from docshell/test/test_close_onpagehide_by_window_close.html
rename to docshell/test/mochitest/test_close_onpagehide_by_window_close.html
rename from docshell/test/test_forceinheritprincipal_overrule_owner.html
rename to docshell/test/mochitest/test_forceinheritprincipal_overrule_owner.html
rename from docshell/test/test_framedhistoryframes.html
rename to docshell/test/mochitest/test_framedhistoryframes.html
rename from docshell/test/test_pushState_after_document_open.html
rename to docshell/test/mochitest/test_pushState_after_document_open.html
--- a/docshell/test/test_pushState_after_document_open.html
+++ b/docshell/test/mochitest/test_pushState_after_document_open.html
@@ -10,20 +10,22 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 957479 **/
   SimpleTest.waitForExplicitFinish();
   // Child needs to invoke us, otherwise our onload will fire before the child
   // has done the write/close bit.
   onmessage = function doTest() {
-    is(frames[0].location.pathname, "/tests/docshell/test/file_pushState_after_document_open.html", "Should have the right path here");
+    is(frames[0].location.pathname, "/tests/docshell/test/mochitest/file_pushState_after_document_open.html",
+       "Should have the right path here");
     is(frames[0].location.hash, "", "Should have the right hash here");
     frames[0].history.pushState({}, '', frames[0].document.URL + "#foopy");
-    is(frames[0].location.pathname, "/tests/docshell/test/file_pushState_after_document_open.html", "Pathname should not have changed");
+    is(frames[0].location.pathname, "/tests/docshell/test/mochitest/file_pushState_after_document_open.html",
+       "Pathname should not have changed");
     is(frames[0].location.hash, "#foopy", "Hash should have changed");
     SimpleTest.finish();
   }
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=957479">Mozilla Bug 957479</a>
rename from docshell/test/test_triggeringprincipal_location_seturi.html
rename to docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
rename from docshell/test/test_windowedhistoryframes.html
rename to docshell/test/mochitest/test_windowedhistoryframes.html
rename from docshell/test/url1_historyframe.html
rename to docshell/test/mochitest/url1_historyframe.html
rename from docshell/test/url2_historyframe.html
rename to docshell/test/mochitest/url2_historyframe.html
--- a/docshell/test/moz.build
+++ b/docshell/test/moz.build
@@ -64,16 +64,56 @@ with Files('chrome/*private_hidden_windo
 
 with Files('iframesandbox/**'):
     BUG_COMPONENT = ('Core', 'Security')
 
 with Files('iframesandbox/*marquee_event_handlers*'):
     BUG_COMPONENT = ('Core', 'DOM: Security')
 
 
+with Files('mochitest/*1045096*'):
+    BUG_COMPONENT = ('Core', 'DOM')
+
+with Files('mochitest/*1151421*'):
+    BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
+
+with Files('mochitest/*402210*'):
+    BUG_COMPONENT = ('Core', 'DOM: Security')
+
+with Files('mochitest/*509055*'):
+    BUG_COMPONENT = ('Core', 'History: Global')
+
+with Files('mochitest/*511449*'):
+    BUG_COMPONENT = ('Core', 'Widget: Cocoa')
+
+with Files('mochitest/*551225*'):
+    BUG_COMPONENT = ('Core', 'DOM')
+
+with Files('mochitest/*570341*'):
+    BUG_COMPONENT = ('Core', 'DOM')
+
+with Files('mochitest/*580069*'):
+    BUG_COMPONENT = ('Core', 'DOM')
+
+with Files('mochitest/*637644*'):
+    BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
+
+with Files('mochitest/*640387*'):
+    BUG_COMPONENT = ('Core', 'DOM: Events')
+
+with Files('mochitest/*668513*'):
+    BUG_COMPONENT = ('Core', 'DOM')
+
+with Files('mochitest/*797909*'):
+    BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
+
+with Files('mochitest/*forceinheritprincipal*'):
+    BUG_COMPONENT = ('Core', 'DOM: Security')
+
+
 with Files('navigation/*13871.html'):
     BUG_COMPONENT = ('Core', 'Security')
 
 with Files('navigation/*386782*'):
     BUG_COMPONENT = ('Core', 'Editor')
 
 with Files('navigation/*430624*'):
     BUG_COMPONENT = ('Core', 'Editor')
@@ -94,47 +134,8 @@ with Files('navigation/*triggering*'):
     BUG_COMPONENT = ('Core', 'DOM: Security')
 
 
 with Files('unit/*442584*'):
     BUG_COMPONENT = ('Core', 'Networking: Cache')
 
 with Files('unit/*setUsePrivateBrowsing*'):
     BUG_COMPONENT = ('Firefox', 'Extension Compatibility')
-
-with Files('*1045096*'):
-    BUG_COMPONENT = ('Core', 'DOM')
-
-with Files('*1151421*'):
-    BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
-
-with Files('*402210*'):
-    BUG_COMPONENT = ('Core', 'DOM: Security')
-
-with Files('*509055*'):
-    BUG_COMPONENT = ('Core', 'History: Global')
-
-with Files('*511449*'):
-    BUG_COMPONENT = ('Core', 'Widget: Cocoa')
-
-with Files('*551225*'):
-    BUG_COMPONENT = ('Core', 'DOM')
-
-with Files('*570341*'):
-    BUG_COMPONENT = ('Core', 'DOM')
-
-with Files('*580069*'):
-    BUG_COMPONENT = ('Core', 'DOM')
-
-with Files('*637644*'):
-    BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
-
-with Files('*640387*'):
-    BUG_COMPONENT = ('Core', 'DOM: Events')
-
-with Files('*668513*'):
-    BUG_COMPONENT = ('Core', 'DOM')
-
-with Files('*797909*'):
-    BUG_COMPONENT = ('Core', 'DOM: Core & HTML')
-
-with Files('*forceinheritprincipal*'):
-    BUG_COMPONENT = ('Core', 'DOM: Security')