diff --git a/accessible/tests/mochitest/tree/test_combobox.xul b/accessible/tests/mochitest/tree/test_combobox.xul index 9d14e126a1f..886fa289bd6 100644 --- a/accessible/tests/mochitest/tree/test_combobox.xul +++ b/accessible/tests/mochitest/tree/test_combobox.xul @@ -171,7 +171,7 @@ + value="http://mochi.test:8888/redirect-a11y.html"/> diff --git a/browser/base/content/test/browser_bug329212.js b/browser/base/content/test/browser_bug329212.js index 95508a00a94..af0b285b454 100644 --- a/browser/base/content/test/browser_bug329212.js +++ b/browser/base/content/test/browser_bug329212.js @@ -33,6 +33,6 @@ function test () { }, true); content.location = - "http://localhost:8888/browser/browser/base/content/test/title_test.svg"; + "http://mochi.test:8888/browser/browser/base/content/test/title_test.svg"; } diff --git a/browser/base/content/test/browser_bug416661.js b/browser/base/content/test/browser_bug416661.js index 5f274a0afbf..d861bdd9492 100644 --- a/browser/base/content/test/browser_bug416661.js +++ b/browser/base/content/test/browser_bug416661.js @@ -11,7 +11,7 @@ function start_test_prefNotSet() { isnot(zoomLevel, 1, "zoom level should have changed"); content.location = - "http://localhost:8888/browser/browser/base/content/test/moz.png"; + "http://mochi.test:8888/browser/browser/base/content/test/moz.png"; } function continue_test_prefNotSet () { @@ -22,7 +22,7 @@ function continue_test_prefNotSet () { FullZoom.reset(); content.location = - "http://localhost:8888/browser/browser/base/content/test/zoom_test.html"; + "http://mochi.test:8888/browser/browser/base/content/test/zoom_test.html"; } function end_test_prefNotSet() { @@ -44,6 +44,6 @@ function test() { tabElm.linkedBrowser.addEventListener("load", start_test_prefNotSet, true); content.location = - "http://localhost:8888/browser/browser/base/content/test/zoom_test.html"; + "http://mochi.test:8888/browser/browser/base/content/test/zoom_test.html"; } diff --git a/browser/base/content/test/browser_bug479408.js b/browser/base/content/test/browser_bug479408.js index 5e2512aa283..0a14e225938 100644 --- a/browser/base/content/test/browser_bug479408.js +++ b/browser/base/content/test/browser_bug479408.js @@ -1,7 +1,7 @@ function test() { waitForExplicitFinish(); let tab = gBrowser.selectedTab = gBrowser.addTab( - "http://localhost:8888/browser/browser/base/content/test/browser_bug479408_sample.html"); + "http://mochi.test:8888/browser/browser/base/content/test/browser_bug479408_sample.html"); gBrowser.addEventListener("DOMLinkAdded", function(aEvent) { gBrowser.removeEventListener("DOMLinkAdded", arguments.callee, true); diff --git a/browser/base/content/test/browser_relatedTabs.js b/browser/base/content/test/browser_relatedTabs.js index 194c7afd640..02e08ad180b 100644 --- a/browser/base/content/test/browser_relatedTabs.js +++ b/browser/base/content/test/browser_relatedTabs.js @@ -45,22 +45,22 @@ function test() { function addTab(aURL,aReferrer) tabs.push(gBrowser.addTab(aURL, {referrerURI: aReferrer})); - addTab("http://localhost:8888/#0"); + addTab("http://mochi.test:8888/#0"); gBrowser.selectedTab = tabs[0]; - addTab("http://localhost:8888/#1"); - addTab("http://localhost:8888/#2",gBrowser.currentURI); - addTab("http://localhost:8888/#3",gBrowser.currentURI); + addTab("http://mochi.test:8888/#1"); + addTab("http://mochi.test:8888/#2",gBrowser.currentURI); + addTab("http://mochi.test:8888/#3",gBrowser.currentURI); gBrowser.selectedTab = tabs[tabs.length - 1]; gBrowser.selectedTab = tabs[0]; - addTab("http://localhost:8888/#4",gBrowser.currentURI); + addTab("http://mochi.test:8888/#4",gBrowser.currentURI); gBrowser.selectedTab = tabs[3]; - addTab("http://localhost:8888/#5",gBrowser.currentURI); + addTab("http://mochi.test:8888/#5",gBrowser.currentURI); gBrowser.removeTab(tabs.pop()); addTab("about:blank",gBrowser.currentURI); gBrowser.moveTabTo(gBrowser.selectedTab, 1); - addTab("http://localhost:8888/#6",gBrowser.currentURI); + addTab("http://mochi.test:8888/#6",gBrowser.currentURI); addTab(); - addTab("http://localhost:8888/#7"); + addTab("http://mochi.test:8888/#7"); return tabs; } diff --git a/browser/base/content/test/test_offlineNotification.html b/browser/base/content/test/test_offlineNotification.html index d9ab78293c4..33c099cf8dd 100644 --- a/browser/base/content/test/test_offlineNotification.html +++ b/browser/base/content/test/test_offlineNotification.html @@ -104,7 +104,7 @@ function loaded() { var win = wm.getMostRecentWindow("navigator:browser"); var notificationBox = win.gBrowser.getNotificationBox(); - var notification = notificationBox.getNotificationWithValue("offline-app-requested-localhost"); + var notification = notificationBox.getNotificationWithValue("offline-app-requested-mochi.test"); notification.childNodes[0].click(); notification = notificationBox.getNotificationWithValue("offline-app-requested-example.com"); diff --git a/browser/base/content/test/test_offline_gzip.html b/browser/base/content/test/test_offline_gzip.html index 3548774259a..f8414c1da53 100644 --- a/browser/base/content/test/test_offline_gzip.html +++ b/browser/base/content/test/test_offline_gzip.html @@ -37,7 +37,7 @@ function finishTest() { var pm = Components.classes["@mozilla.org/permissionmanager;1"]. getService(Components.interfaces.nsIPermissionManager); - pm.remove("localhost", "offline-app"); + pm.remove("mochi.test", "offline-app"); window.removeEventListener("message", handleMessageEvents, false); @@ -103,7 +103,7 @@ function loaded() { var notificationBox = win.gBrowser.getNotificationBox(); var notification = notificationBox - .getNotificationWithValue("offline-app-requested-localhost"); + .getNotificationWithValue("offline-app-requested-mochi.test"); notification.childNodes[0].click(); } diff --git a/browser/components/feeds/test/chrome/test_423060.xul b/browser/components/feeds/test/chrome/test_423060.xul index f015651a38b..ba7263a184d 100644 --- a/browser/components/feeds/test/chrome/test_423060.xul +++ b/browser/components/feeds/test/chrome/test_423060.xul @@ -29,7 +29,7 @@ /* register a handler for the feed type */ const MAYBE_FEED = "application/vnd.mozilla.maybe.feed"; - var handlerPage = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=%s"; + var handlerPage = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=%s"; var wccr = Cc[wccrID].getService(Ci.nsIWebContentConverterService); wccr.registerContentHandler(MAYBE_FEED, handlerPage, "Demo handler", null); var demoHandler = wccr.getWebContentHandlerByURI(MAYBE_FEED, handlerPage); @@ -40,7 +40,7 @@ function finishUp() { var theframe = document.getElementById('theframe'); - var previewURL = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=http%3A%2F%2Flocalhost%3A8888%2Ftests%2Ftoolkit%2Fcomponents%2Fplaces%2Ftests%2Fchrome%2Fsample_feed.atom"; + var previewURL = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=http%3A%2F%2Fmochi.test%3A8888%2Ftests%2Ftoolkit%2Fcomponents%2Fplaces%2Ftests%2Fchrome%2Fsample_feed.atom"; is(theframe.contentDocument.URL, previewURL); /* remove our demoHandler */ @@ -52,7 +52,7 @@ SimpleTest.finish(); } - - \ No newline at end of file + diff --git a/browser/components/feeds/test/test_registerHandler.html b/browser/components/feeds/test/test_registerHandler.html index fc1b68aa950..9c304e77a08 100644 --- a/browser/components/feeds/test/test_registerHandler.html +++ b/browser/components/feeds/test/test_registerHandler.html @@ -40,12 +40,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788 ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined"); // testing a generic case - is(true, testRegisterHandler(true, "foo", "http://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler should work"); - is(true, testRegisterHandler(false, "application/rss+xml", "http://localhost:8888/%s", "Foo handler"), "registering a foo content handler should work"); + is(true, testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler should work"); + is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler should work"); // testing with wrong uris - is(false, testRegisterHandler(true, "foo", "http://localhost:8888/", "Foo handler"), "a protocol handler uri should contain %s"); - is(false, testRegisterHandler(false, "application/rss+xml", "http://localhost:8888/", "Foo handler"), "a content handler uri should contain %s"); + is(false, testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), "a protocol handler uri should contain %s"); + is(false, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), "a content handler uri should contain %s"); // the spec says we should not throw here, but it probably needs to be changed is(false, testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), "a protocol handler uri should be valid"); @@ -57,28 +57,28 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788 // restriction to http(s) for the uri of the handler (bug 401343) // https should work (http already tested in the generic case) - is(true, testRegisterHandler(true, "foo", "https://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work"); - is(true, testRegisterHandler(false, "application/rss+xml", "https://localhost:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work"); + is(true, testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work"); + is(true, testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work"); // ftp should not work - is(false, testRegisterHandler(true, "foo", "ftp://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work"); - is(false, testRegisterHandler(false, "application/rss+xml", "ftp://localhost:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work"); + is(false, testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work"); + is(false, testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work"); // chrome should not work - is(false, testRegisterHandler(true, "foo", "chrome://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work"); - is(false, testRegisterHandler(false, "application/rss+xml", "chrome://localhost:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work"); + is(false, testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work"); + is(false, testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work"); // foo should not work - is(false, testRegisterHandler(true, "foo", "foo://localhost:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work"); - is(false, testRegisterHandler(false, "application/rss+xml", "foo://localhost:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work"); + is(false, testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work"); + is(false, testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work"); // for security reasons, protocol handlers should never be registered for some schemes (chrome, vbscript, ...) (bug 402788) - is(false, testRegisterHandler(true, "chrome", "http://localhost:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work"); - is(false, testRegisterHandler(true, "vbscript", "http://localhost:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work"); - is(false, testRegisterHandler(true, "javascript", "http://localhost:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work"); - is(false, testRegisterHandler(true, "moz-icon", "http://localhost:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work"); + is(false, testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work"); + is(false, testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work"); + is(false, testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work"); + is(false, testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work"); // for security reasons, content handlers should never be registered for some types (html, ...) - is(true, testRegisterHandler(false, "application/rss+xml", "http://localhost:8888/%s", "Foo handler"), "registering rss content handlers should work"); - is(true, testRegisterHandler(false, "application/atom+xml", "http://localhost:8888/%s", "Foo handler"), "registering atom content handlers should work"); - todo(false, testRegisterHandler(false, "text/html", "http://localhost:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798 + is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering rss content handlers should work"); + is(true, testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering atom content handlers should work"); + todo(false, testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798 diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js index 74f79197b5f..8ec728d14de 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js @@ -129,7 +129,7 @@ function addDownload(dm, aParams) aParams.targetFile.append(aParams.resultFileName); } if (!("sourceURI" in aParams)) - aParams.sourceURI = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/staller.sjs"; + aParams.sourceURI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/staller.sjs"; if (!("downloadName" in aParams)) aParams.downloadName = null; if (!("runBeforeStart" in aParams)) diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js index c7ef5e6e9ff..45d81792b2b 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js @@ -43,7 +43,7 @@ function test() { let pb = Cc["@mozilla.org/privatebrowsing;1"]. getService(Ci.nsIPrivateBrowsingService); - const testPageURL = "http://localhost:8888/browser/" + + const testPageURL = "http://mochi.test:8888/browser/" + "browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt_page.html"; waitForExplicitFinish(); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js index 6482837d998..f4194ddb72f 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js @@ -51,7 +51,7 @@ function test() { getService(Ci.nsICookieManager); waitForExplicitFinish(); - const TEST_URL = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/title.sjs"; + const TEST_URL = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/title.sjs"; function cleanup() { // delete all history items diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupblocker.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupblocker.js index ba66cacf362..a7caf02b6e9 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupblocker.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_popupblocker.js @@ -46,7 +46,7 @@ function test() { let oldPopupPolicy = gPrefService.getBoolPref("dom.disable_open_during_load"); gPrefService.setBoolPref("dom.disable_open_during_load", true); - const TEST_URI = "http://localhost:8888/browser/browser/components/privatebrowsing/test/browser/popup.html"; + const TEST_URI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/popup.html"; waitForExplicitFinish(); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js index 6aff23e6279..bc72e185198 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js @@ -44,7 +44,7 @@ function test() { let pb = Cc["@mozilla.org/privatebrowsing;1"]. getService(Ci.nsIPrivateBrowsingService); - const testPageURL = "http://localhost:8888/browser/" + + const testPageURL = "http://mochi.test:8888/browser/" + "browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle_page.html"; waitForExplicitFinish(); diff --git a/browser/components/search/test/426329.xml b/browser/components/search/test/426329.xml index 6bad8a58061..e4545cc7712 100644 --- a/browser/components/search/test/426329.xml +++ b/browser/components/search/test/426329.xml @@ -4,8 +4,8 @@ 426329 Search utf-8 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC - + - http://localhost:8888/browser/browser/components/search/test/test.html + http://mochi.test:8888/browser/browser/components/search/test/test.html diff --git a/browser/components/search/test/483086-1.xml b/browser/components/search/test/483086-1.xml index e792fc95092..9dbba4886de 100644 --- a/browser/components/search/test/483086-1.xml +++ b/browser/components/search/test/483086-1.xml @@ -3,7 +3,7 @@ 483086a Bug 483086 Test 1 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC - + foo://example.com diff --git a/browser/components/search/test/483086-2.xml b/browser/components/search/test/483086-2.xml index ed2d4a71c4a..f130b906899 100644 --- a/browser/components/search/test/483086-2.xml +++ b/browser/components/search/test/483086-2.xml @@ -3,7 +3,7 @@ 483086b Bug 483086 Test 2 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC - + http://example.com diff --git a/browser/components/search/test/browser_415700.js b/browser/components/search/test/browser_415700.js index 9de472c4f87..44c872aa95d 100644 --- a/browser/components/search/test/browser_415700.js +++ b/browser/components/search/test/browser_415700.js @@ -56,7 +56,7 @@ function test() { waitForExplicitFinish(); gObs.addObserver(observers, "browser-search-engine-modified", false); - gSS.addEngine("http://localhost:8888/browser/browser/components/search/test/testEngine.xml", + gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml", Ci.nsISearchEngine.DATA_XML, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC", false); } diff --git a/browser/components/search/test/browser_426329.js b/browser/components/search/test/browser_426329.js index f9ed3530142..8d38693623a 100644 --- a/browser/components/search/test/browser_426329.js +++ b/browser/components/search/test/browser_426329.js @@ -33,7 +33,7 @@ function test() { } obs.addObserver(observer, "browser-search-engine-modified", false); - ss.addEngine("http://localhost:8888/browser/browser/components/search/test/426329.xml", + ss.addEngine("http://mochi.test:8888/browser/browser/components/search/test/426329.xml", Ci.nsISearchEngine.DATA_XML, "data:image/x-icon,%00", false); diff --git a/browser/components/search/test/browser_483086.js b/browser/components/search/test/browser_483086.js index 6495106a30e..f449ebe7322 100644 --- a/browser/components/search/test/browser_483086.js +++ b/browser/components/search/test/browser_483086.js @@ -58,7 +58,7 @@ function test() { } gObs.addObserver(observer, "browser-search-engine-modified", false); - gSS.addEngine("http://localhost:8888/browser/browser/components/search/test/483086-1.xml", + gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/483086-1.xml", Ci.nsISearchEngine.DATA_XML, "data:image/x-icon;%00", false); } @@ -80,7 +80,7 @@ function test2() { } gObs.addObserver(observer, "browser-search-engine-modified", false); - gSS.addEngine("http://localhost:8888/browser/browser/components/search/test/483086-2.xml", + gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/483086-2.xml", Ci.nsISearchEngine.DATA_XML, "data:image/x-icon;%00", false); } diff --git a/browser/components/search/test/testEngine.xml b/browser/components/search/test/testEngine.xml index 8a7dbc1a0db..21ddc4b9a9f 100644 --- a/browser/components/search/test/testEngine.xml +++ b/browser/components/search/test/testEngine.xml @@ -4,9 +4,9 @@ Foo Search utf-8 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC - + - http://localhost:8888/browser/browser/components/search/test/ + http://mochi.test:8888/browser/browser/components/search/test/ fooalias diff --git a/browser/components/sessionstore/test/browser/browser_248970_a.js b/browser/components/sessionstore/test/browser/browser_248970_a.js index ab282eee20d..4937d07694b 100644 --- a/browser/components/sessionstore/test/browser/browser_248970_a.js +++ b/browser/components/sessionstore/test/browser/browser_248970_a.js @@ -115,7 +115,7 @@ function test() { this.removeEventListener("load", arguments.callee, true); // private browsing session, add new tab: (C) - const testURL_C = "http://localhost:8888/"; + const testURL_C = "http://mochi.test:8888/"; let tab_C = gBrowser.addTab(testURL_C); tab_C.linkedBrowser.addEventListener("load", function (aEvent) { diff --git a/browser/components/sessionstore/test/browser/browser_248970_b.js b/browser/components/sessionstore/test/browser/browser_248970_b.js index 0301e48a7f9..1246ad6f814 100644 --- a/browser/components/sessionstore/test/browser/browser_248970_b.js +++ b/browser/components/sessionstore/test/browser/browser_248970_b.js @@ -114,7 +114,7 @@ function test() { const testURL = "chrome://mochikit/content/browser/" + "browser/components/sessionstore/test/browser/browser_248970_b_sample.html"; - const testURL2 = "http://localhost:8888/browser/" + + const testURL2 = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_248970_b_sample.html"; // get closed tab count diff --git a/browser/components/sessionstore/test/browser/browser_339445.js b/browser/components/sessionstore/test/browser/browser_339445.js index b2e8dfb70d7..cb2b22fd073 100644 --- a/browser/components/sessionstore/test/browser/browser_339445.js +++ b/browser/components/sessionstore/test/browser/browser_339445.js @@ -39,7 +39,7 @@ function test() { waitForExplicitFinish(); - let testURL = "http://localhost:8888/browser/" + + let testURL = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_339445_sample.html"; let tab = gBrowser.addTab(testURL); diff --git a/browser/components/sessionstore/test/browser/browser_423132.js b/browser/components/sessionstore/test/browser/browser_423132.js index deacd8784c3..3f33eff14dd 100644 --- a/browser/components/sessionstore/test/browser/browser_423132.js +++ b/browser/components/sessionstore/test/browser/browser_423132.js @@ -63,7 +63,7 @@ function test() { // the interval pref to 0 gPrefService.setIntPref("browser.sessionstore.interval", 0); - const testURL = "http://localhost:8888/browser/" + + const testURL = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_423132_sample.html"; // open a new window diff --git a/browser/components/sessionstore/test/browser/browser_447951.js b/browser/components/sessionstore/test/browser/browser_447951.js index 7c860c1e814..32b78dcff9c 100644 --- a/browser/components/sessionstore/test/browser/browser_447951.js +++ b/browser/components/sessionstore/test/browser/browser_447951.js @@ -40,7 +40,7 @@ function test() { // test setup let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore); waitForExplicitFinish(); - const baseURL = "http://localhost:8888/browser/" + + const baseURL = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_447951_sample.html#"; let tab = gBrowser.addTab(); diff --git a/browser/components/sessionstore/test/browser/browser_459906.js b/browser/components/sessionstore/test/browser/browser_459906.js index 56cf5c2dccd..2886385a80a 100644 --- a/browser/components/sessionstore/test/browser/browser_459906.js +++ b/browser/components/sessionstore/test/browser/browser_459906.js @@ -39,7 +39,7 @@ function test() { waitForExplicitFinish(); - let testURL = "http://localhost:8888/browser/" + + let testURL = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_459906_sample.html"; let uniqueValue = "Unique: " + Date.now(); @@ -81,7 +81,7 @@ function test() { innerDomain = iframes[0].document.domain; } catch (ex) { /* throws for chrome: documents */ } - is(innerDomain, "localhost", "XSS exploit prevented!"); + is(innerDomain, "mochi.test", "XSS exploit prevented!"); // clean up gBrowser.removeTab(tab2); diff --git a/browser/components/sessionstore/test/browser/browser_461743.js b/browser/components/sessionstore/test/browser/browser_461743.js index 744480608cf..754fa6dee38 100644 --- a/browser/components/sessionstore/test/browser/browser_461743.js +++ b/browser/components/sessionstore/test/browser/browser_461743.js @@ -39,7 +39,7 @@ function test() { waitForExplicitFinish(); - let testURL = "http://localhost:8888/browser/" + + let testURL = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_461743_sample.html"; let frameCount = 0; diff --git a/browser/components/sessionstore/test/browser/browser_463205_sample.html b/browser/components/sessionstore/test/browser/browser_463205_sample.html index c774d0263fc..119d3b05cac 100644 --- a/browser/components/sessionstore/test/browser/browser_463205_sample.html +++ b/browser/components/sessionstore/test/browser/browser_463205_sample.html @@ -17,7 +17,7 @@ } else { frames[1].document.location.hash = "#original"; - frames[0].document.location = "http://localhost:8888/browser/" + + frames[0].document.location = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_463205_helper.html"; } }, false); diff --git a/browser/components/sessionstore/test/browser/browser_463206.js b/browser/components/sessionstore/test/browser/browser_463206.js index bc5f604382c..4e973f25a70 100644 --- a/browser/components/sessionstore/test/browser/browser_463206.js +++ b/browser/components/sessionstore/test/browser/browser_463206.js @@ -39,7 +39,7 @@ function test() { waitForExplicitFinish(); - let testURL = "http://localhost:8888/browser/" + + let testURL = "http://mochi.test:8888/browser/" + "browser/components/sessionstore/test/browser/browser_463206_sample.html"; var frameCount = 0; diff --git a/browser/components/sessionstore/test/browser/browser_464620_a.html b/browser/components/sessionstore/test/browser/browser_464620_a.html index a2cf68cc1d6..c1871ea7672 100644 --- a/browser/components/sessionstore/test/browser/browser_464620_a.html +++ b/browser/components/sessionstore/test/browser/browser_464620_a.html @@ -6,7 +6,7 @@ @@ -87,4 +87,4 @@ function post(e, res) { Inner page - \ No newline at end of file + diff --git a/content/base/test/file_CrossSiteXHR_inner.jar b/content/base/test/file_CrossSiteXHR_inner.jar index 032617c6f4f..011c6cb24e4 100644 Binary files a/content/base/test/file_CrossSiteXHR_inner.jar and b/content/base/test/file_CrossSiteXHR_inner.jar differ diff --git a/content/base/test/file_htmlserializer_1_links.html b/content/base/test/file_htmlserializer_1_links.html index b0dfbc50fd0..bd5467f234c 100644 --- a/content/base/test/file_htmlserializer_1_links.html +++ b/content/base/test/file_htmlserializer_1_links.html @@ -11,7 +11,7 @@ adipiscing elit. Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus aliquet lectus. Nunc vitae eros. Class aptent taciti sociosqu ad litora torquent per +href="http://mochi.test:8888/tests/content/base/test/file_htmlserializer_1_result1.html">per conubia nostra, per inceptos hymenaeos.

@@ -50,4 +50,4 @@ ut gravida eros leo ut libero

Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus -aliquet lectus. Nunc vitae eros. Class aptent taciti

\ No newline at end of file +aliquet lectus. Nunc vitae eros. Class aptent taciti

diff --git a/content/base/test/file_xhtmlserializer_1.xhtml b/content/base/test/file_xhtmlserializer_1.xhtml index 600bdb37dff..64271ce2cee 100644 --- a/content/base/test/file_xhtmlserializer_1.xhtml +++ b/content/base/test/file_xhtmlserializer_1.xhtml @@ -57,4 +57,4 @@ ut gravida eros
leo ut libero lacus risus pulvinar ante. - \ No newline at end of file + diff --git a/content/base/test/file_xhtmlserializer_1_links.xhtml b/content/base/test/file_xhtmlserializer_1_links.xhtml index 803244e2f2e..3db4d350441 100644 --- a/content/base/test/file_xhtmlserializer_1_links.xhtml +++ b/content/base/test/file_xhtmlserializer_1_links.xhtml @@ -14,7 +14,7 @@ adipiscing elit. Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus aliquet lectus. Nunc vitae eros. Class aptent taciti sociosqu ad litora torquent per +href="http://mochi.test:8888/tests/content/base/test/file_htmlserializer_1_result1.html">per conubia nostra, per inceptos hymenaeos.

@@ -68,4 +68,4 @@ pharetra rutrum,
lacus risus pulvinar ante. - \ No newline at end of file + diff --git a/content/base/test/test_CSP.html b/content/base/test/test_CSP.html index 3875e387fa1..8b3aa794cdb 100644 --- a/content/base/test/test_CSP.html +++ b/content/base/test/test_CSP.html @@ -119,7 +119,15 @@ SimpleTest.waitForExplicitFinish(); // save this for last so that our listeners are registered. // ... this loads the testbed of good and bad requests. -document.getElementById('cspframe').src = 'file_CSP.sjs?main=1'; + +netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); +var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); +var pps = Components.classes["@mozilla.org/network/protocol-proxy-service;1"].getService(); + +var uri = ios.newURI("http://example.com", null, null); +var pi = pps.resolve(uri, 0); +var proxy = pi.host + ":" + pi.port; +document.getElementById('cspframe').src = 'file_CSP.sjs?main=1&proxy=' + proxy; diff --git a/content/base/test/test_CrossSiteXHR.html b/content/base/test/test_CrossSiteXHR.html index b799cccdcaa..f45c223a39e 100644 --- a/content/base/test/test_CrossSiteXHR.html +++ b/content/base/test/test_CrossSiteXHR.html @@ -68,7 +68,7 @@ function runTest() { // Test preflight-less requests basePath = "/tests/content/base/test/file_CrossSiteXHR_server.sjs?" - baseURL = "http://localhost:8888" + basePath; + baseURL = "http://mochi.test:8888" + basePath; if (!runOriginTests) { origins = []; diff --git a/content/base/test/test_CrossSiteXHR_cache.html b/content/base/test/test_CrossSiteXHR_cache.html index d1cfabaf80f..6cc2aaa0039 100644 --- a/content/base/test/test_CrossSiteXHR_cache.html +++ b/content/base/test/test_CrossSiteXHR_cache.html @@ -419,7 +419,7 @@ function runTest() { }, ]; - baseURL = "http://localhost:8888/tests/content/base/test/" + + baseURL = "http://mochi.test:8888/tests/content/base/test/" + "file_CrossSiteXHR_cache_server.sjs?"; setStateURL = baseURL + "setState="; diff --git a/content/base/test/test_XHRDocURI.html b/content/base/test/test_XHRDocURI.html index 1a582debffb..24236d85b59 100644 --- a/content/base/test/test_XHRDocURI.html +++ b/content/base/test/test_XHRDocURI.html @@ -31,13 +31,13 @@ function runTest() { is(document.baseURI, "http://example.org/", "wrong doc baseURI"); xhr = new XMLHttpRequest; - xhr.open("GET", "http://localhost:8888/tests/content/base/test/file_XHRDocURI.xml"); + xhr.open("GET", "http://mochi.test:8888/tests/content/base/test/file_XHRDocURI.xml"); xhr.onreadystatechange = function(e) { if (!xhr.responseXML) return; - is(xhr.responseXML.documentURI, "http://localhost:8888/tests/content/base/test/file_XHRDocURI.xml", + is(xhr.responseXML.documentURI, "http://mochi.test:8888/tests/content/base/test/file_XHRDocURI.xml", "wrong url"); - is(xhr.responseXML.baseURI, "http://localhost:8888/tests/content/base/test/file_XHRDocURI.xml", + is(xhr.responseXML.baseURI, "http://mochi.test:8888/tests/content/base/test/file_XHRDocURI.xml", "wrong base"); if (xhr.readyState == 4) { gen.next(); @@ -48,7 +48,7 @@ function runTest() { xhr = new XMLHttpRequest; - xhr.open("GET", "http://localhost:8888/tests/content/base/test/file_XHRDocURI.text"); + xhr.open("GET", "http://mochi.test:8888/tests/content/base/test/file_XHRDocURI.text"); xhr.onreadystatechange = function(e) { is(xhr.responseXML, null, "should not have document"); if (xhr.readyState == 4) diff --git a/content/base/test/test_bug345339.html b/content/base/test/test_bug345339.html index acba2edae72..323d5c799ad 100644 --- a/content/base/test/test_bug345339.html +++ b/content/base/test/test_bug345339.html @@ -15,7 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=345339
 
diff --git a/content/base/test/test_bug475156.html b/content/base/test/test_bug475156.html
index e27cde42777..3a2a68337eb 100644
--- a/content/base/test/test_bug475156.html
+++ b/content/base/test/test_bug475156.html
@@ -14,7 +14,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=475156
 
 SimpleTest.waitForExplicitFinish();
 
-var path = "http://localhost:8888/tests/content/base/test/";
+var path = "http://mochi.test:8888/tests/content/base/test/";
 
 function fromCache(xhr)
 {
diff --git a/content/html/content/test/file_bug209275_3.html b/content/html/content/test/file_bug209275_3.html
index afc89058375..24cf9f7dd13 100644
--- a/content/html/content/test/file_bug209275_3.html
+++ b/content/html/content/test/file_bug209275_3.html
@@ -12,7 +12,7 @@ function load() {
   // our new  will take precedence and the test will pass.
   document.open();
   document.write("A" +
-                 "");
+                 "");
 
   // Tell our parent to have a look at us.
   parent.gGen.next();
diff --git a/content/html/content/test/test_bug209275.xhtml b/content/html/content/test/test_bug209275.xhtml
index 37d3c375339..37981a194a8 100644
--- a/content/html/content/test/test_bug209275.xhtml
+++ b/content/html/content/test/test_bug209275.xhtml
@@ -128,7 +128,7 @@ function run() {
   yield; // wait for onload to fire.
 
   // Make sure things are what as we expect them at the beginning.
-  link123HrefIs("http://localhost:8888/", 1);
+  link123HrefIs("http://mochi.test:8888/", 1);
   is($('link4').href, loc + "#", "link 4 test 1");
   is($('link5').href, loc + "#", "link 5 test 1");
 
@@ -162,15 +162,15 @@ function run() {
 
   $('base1').href = "foo/";
   // Should be interpreted relative to current URI (not the current base), so
-  // base should now be http://localhost:8888/foo/
+  // base should now be http://mochi.test:8888/foo/
 
-  link123HrefIs("http://localhost:8888/", 3);
+  link123HrefIs("http://mochi.test:8888/", 3);
   is($('link4').href, path + "foo/#", "link 4 test 3");
 
   // Changing base2 shouldn't affect anything, because it's not the first base
   // tag.
   $('base2').href = "http://example.org/bar/";
-  link123HrefIs("http://localhost:8888/", 4);
+  link123HrefIs("http://mochi.test:8888/", 4);
   is($('link4').href, path + "foo/#", "link 4 test 4");
 
   // If we unset base1's href attribute, the document's base should come from
@@ -206,13 +206,13 @@ function run() {
   base3.parentNode.removeChild(base3);
   base4.parentNode.removeChild(base4);
 
-  link123HrefIs("http://localhost:8888/", 9);
+  link123HrefIs("http://mochi.test:8888/", 9);
   is($('link4').href, loc + "#", "link 4 test 9");
 
   // Setting the href of base0 shouldn't do anything because it's not in the
   // XHTML namespace.
   $('base0').href = "http://bar.com";
-  link123HrefIs("http://localhost:8888/", 10);
+  link123HrefIs("http://mochi.test:8888/", 10);
   is($('link4').href, loc + "#", "link 4 test 10");
 
   // We load into an iframe a document with a , then remove
@@ -231,7 +231,7 @@ function run() {
   iframeCw.location = "file_bug209275_2.html";
   yield; // wait for callback from child
   is(iframeCw.document.getElementById("link").href,
-     "http://localhost:8888/",
+     "http://mochi.test:8888/",
      "Wrong href after nuking document second time.");
 
   // Make sure that document.open() makes the document forget about any 
@@ -239,7 +239,7 @@ function run() {
   iframeCw.location = "file_bug209275_3.html";
   yield; // wait for callback from child
   is(iframeCw.document.getElementById("link").href,
-     "http://localhost:8888/",
+     "http://mochi.test:8888/",
      "Wrong href after document.open().");
 
   SimpleTest.finish();
diff --git a/content/html/content/test/test_bug353415-1.html b/content/html/content/test/test_bug353415-1.html
index 3352ee552f4..47f453ccf35 100644
--- a/content/html/content/test/test_bug353415-1.html
+++ b/content/html/content/test/test_bug353415-1.html
@@ -32,7 +32,7 @@
 
 	SimpleTest.waitForExplicitFinish();
         function doCheck(){
-		is(frames['submit_frame'].location.href, "http://localhost:8888/blah?field1=teststring&field2=0&field4=1&field6=3&field7=2&field8=8&field9=9&field12=", "Submit string was correct.");
+		is(frames['submit_frame'].location.href, "http://mochi.test:8888/blah?field1=teststring&field2=0&field4=1&field6=3&field7=2&field8=8&field9=9&field12=", "Submit string was correct.");
                 SimpleTest.finish();
 	}
 
diff --git a/content/html/content/test/test_bug353415-2.html b/content/html/content/test/test_bug353415-2.html
index 9ca189e1d79..6a121db7da6 100644
--- a/content/html/content/test/test_bug353415-2.html
+++ b/content/html/content/test/test_bug353415-2.html
@@ -57,7 +57,7 @@
 
 	SimpleTest.waitForExplicitFinish();
         function doCheck(){
-		is(frames['submit_frame'].location.href, "http://localhost:8888/blah?field1-2=teststring&field2-2=0&field4-2=1&field6-2=3&field7-2=2&field8-2=8&field9-2=9&field12-2=&field1=teststring&field2=0&field4=1&field6=3&field7=2&field8=8&field9=9&field12=&field14=14&field14-2=14", "Submit string was correct.");
+		is(frames['submit_frame'].location.href, "http://mochi.test:8888/blah?field1-2=teststring&field2-2=0&field4-2=1&field6-2=3&field7-2=2&field8-2=8&field9-2=9&field12-2=&field1=teststring&field2=0&field4=1&field6=3&field7=2&field8=8&field9=9&field12=&field14=14&field14-2=14", "Submit string was correct.");
                 SimpleTest.finish();
 	}
 
diff --git a/content/html/content/test/test_bug392567.html b/content/html/content/test/test_bug392567.html
index fac5855ba5f..b8f66af1502 100644
--- a/content/html/content/test/test_bug392567.html
+++ b/content/html/content/test/test_bug392567.html
@@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=392567
 
 /** Test for Bug 392567 **/
 
-var dataUrl = "http://localhost:8888/tests/content/html/content/test/bug392567.jar";
+var dataUrl = "http://mochi.test:8888/tests/content/html/content/test/bug392567.jar";
 var jarUrl = "jar:" + dataUrl + "!/index.html";
 var httpUrl = location.href.replace(/\.html.*/, "_404");
 
diff --git a/content/html/document/test/bug196523-subframe.html b/content/html/document/test/bug196523-subframe.html
index 6fc153d44d3..ac53572a7a3 100644
--- a/content/html/document/test/bug196523-subframe.html
+++ b/content/html/document/test/bug196523-subframe.html
@@ -2,11 +2,11 @@
 
 
diff --git a/content/xbl/test/file_bug379959_data.html b/content/xbl/test/file_bug379959_data.html
index 977b1d89ea0..a84b63ca33a 100644
--- a/content/xbl/test/file_bug379959_data.html
+++ b/content/xbl/test/file_bug379959_data.html
@@ -12,7 +12,7 @@
 
 
diff --git a/content/xbl/test/test_bug379959.html b/content/xbl/test/test_bug379959.html
index 9c958bd7be4..25efe713373 100644
--- a/content/xbl/test/test_bug379959.html
+++ b/content/xbl/test/test_bug379959.html
@@ -29,7 +29,7 @@ var messages = 0;
 
 function receiveMessage(e)
 {
-  is(e.origin, "http://localhost:8888", "wrong sender!");
+  is(e.origin, "http://mochi.test:8888", "wrong sender!");
   messages++;
   gen.send(e.data);
 }
diff --git a/docshell/test/chrome/bug215405_window.xul b/docshell/test/chrome/bug215405_window.xul
index 6a05fdc494a..6006af254c1 100644
--- a/docshell/test/chrome/bug215405_window.xul
+++ b/docshell/test/chrome/bug215405_window.xul
@@ -52,7 +52,7 @@
     }
 
     const text="MOZILLA";
-    const nostoreURI = "http://localhost:8888/tests/docshell/test/chrome/" +
+    const nostoreURI = "http://mochi.test:8888/tests/docshell/test/chrome/" +
                        "215405_nostore.html";
     const nocacheURI = "https://example.com:443/tests/docshell/test/chrome/" +
                        "215405_nocache.html";
diff --git a/docshell/test/chrome/bug92598_window.xul b/docshell/test/chrome/bug92598_window.xul
index 6d76a1e78b4..16c81cd23b0 100644
--- a/docshell/test/chrome/bug92598_window.xul
+++ b/docshell/test/chrome/bug92598_window.xul
@@ -118,7 +118,7 @@
     function testsIterator() {
       // Load a page with a no-cache header, followed by a simple page
       // On pagehide, first page should report it is not being persisted
-      var test1DocURI = "http://localhost:8888/tests/docshell/test/chrome/92598_nostore.html";
+      var test1DocURI = "http://mochi.test:8888/tests/docshell/test/chrome/92598_nostore.html";
 
       gExpected = [{type: "pagehide", persisted: true},
                    {type: "load", title: "test1"},
diff --git a/docshell/test/chrome/docshell_helpers.js b/docshell/test/chrome/docshell_helpers.js
index b5633da3b18..3c44497ebb3 100755
--- a/docshell/test/chrome/docshell_helpers.js
+++ b/docshell/test/chrome/docshell_helpers.js
@@ -410,7 +410,7 @@ function enableBFCache(enable) {
  * directory.
  */
 function getHttpUrl(filename) {
-  return "http://localhost:8888/chrome/docshell/test/chrome/" + filename;
+  return "http://mochi.test:8888/chrome/docshell/test/chrome/" + filename;
 }
 
 /**
diff --git a/docshell/test/test_bug369814.html b/docshell/test/test_bug369814.html
index 70b07911db2..58bb6e9f85b 100644
--- a/docshell/test/test_bug369814.html
+++ b/docshell/test/test_bug369814.html
@@ -58,7 +58,7 @@ function loadEvent(window, callback)
 
 function loadTestTarget(callback)
 {
-  gTargetWindow = window.open("http://localhost:8888", "bug369814target");
+  gTargetWindow = window.open("http://mochi.test:8888", "bug369814target");
   loadEvent(gTargetWindow, callback);
 }
 
@@ -126,37 +126,37 @@ function anchorTest(test) {
 
 var gTests = [
   { "name" : "iframes.html loaded from non-jar type, pref disabled",
-    "url" : "jar:http://localhost:8888/tests/docshell/test/bug369814.zip!/iframes.html",
+    "url" : "jar:http://mochi.test:8888/tests/docshell/test/bug369814.zip!/iframes.html",
     "pref" : false,
     "pokes" : { },
     "func" : loadErrorTest,
   },
   { "name" : "refresh.html loaded from non-jar type, pref enabled",
-    "url" : "jar:http://localhost:8888/tests/docshell/test/bug369814.zip!/refresh.html",
+    "url" : "jar:http://mochi.test:8888/tests/docshell/test/bug369814.zip!/refresh.html",
     "pref" : true,
     "pokes" : { },
     "func" : refreshTest,
   },
   { "name" : "iframes.html loaded from non-jar type, pref enabled",
-    "url" : "jar:http://localhost:8888/tests/docshell/test/bug369814.zip!/iframes.html",
+    "url" : "jar:http://mochi.test:8888/tests/docshell/test/bug369814.zip!/iframes.html",
     "pref" : true,
     "pokes" : { },
     "func" : iframeTest,
   },
   { "name" : "anchors.html loaded from non-jar type, pref enabled",
-    "url" : "jar:http://localhost:8888/tests/docshell/test/bug369814.zip!/anchors.html",
+    "url" : "jar:http://mochi.test:8888/tests/docshell/test/bug369814.zip!/anchors.html",
     "pref" : true,
     "pokes" : { },
     "func" : anchorTest,
   },
   { "name" : "iframes.html loaded from view-source jar type, pref disabled",
-    "url" : "jar:view-source:http://localhost:8888/tests/docshell/test/bug369814.jar!/iframes.html",
+    "url" : "jar:view-source:http://mochi.test:8888/tests/docshell/test/bug369814.jar!/iframes.html",
     "pref" : false,
     "pokes" : { },
     "func" : loadErrorTest
   },
   { "name" : "iframes.html loaded from view-source jar type, pref enabled",
-    "url" : "jar:view-source:http://localhost:8888/tests/docshell/test/bug369814.jar!/iframes.html",
+    "url" : "jar:view-source:http://mochi.test:8888/tests/docshell/test/bug369814.jar!/iframes.html",
     "pref" : true,
     "pokes" : { },
     "func" : loadErrorTest
diff --git a/docshell/test/test_bug529119-1.html b/docshell/test/test_bug529119-1.html
index 994e89ef76b..a9e66b58515 100644
--- a/docshell/test/test_bug529119-1.html
+++ b/docshell/test/test_bug529119-1.html
@@ -10,7 +10,7 @@
 
 SimpleTest.waitForExplicitFinish();
 
-var workingURL = "http://localhost:8888/tests/docshell/test/bug529119-window.html";
+var workingURL = "http://mochi.test:8888/tests/docshell/test/bug529119-window.html";
 var faultyURL = "http://some-non-existent-domain-27489274c892748217cn2384.com/";
 
 var w = null;
diff --git a/docshell/test/test_bug529119-2.html b/docshell/test/test_bug529119-2.html
index d4b7b5379d9..b1f284f933f 100644
--- a/docshell/test/test_bug529119-2.html
+++ b/docshell/test/test_bug529119-2.html
@@ -10,7 +10,7 @@
 
 SimpleTest.waitForExplicitFinish();
 
-var workingURL = "http://localhost:8888/tests/docshell/test/bug529119-window.html";
+var workingURL = "http://mochi.test:8888/tests/docshell/test/bug529119-window.html";
 var faultyURL = "http://some-non-existent-domain-27489274c892748217cn2384.com/";
 
 var w = null;
diff --git a/docshell/test/test_bug94514.html b/docshell/test/test_bug94514.html
index e1aab19b140..7a7a6b4e296 100644
--- a/docshell/test/test_bug94514.html
+++ b/docshell/test/test_bug94514.html
@@ -23,7 +23,7 @@ not get added to global history.
 
 SimpleTest.waitForExplicitFinish();
 
-var startURI = "http://localhost:8888/tests/docshell/test/bug94514-postpage.html";
+var startURI = "http://mochi.test:8888/tests/docshell/test/bug94514-postpage.html";
 var postedURI = startURI + "?posted=1";
 
 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
diff --git a/dom/tests/mochitest/ajax/offline/445544.cacheManifest b/dom/tests/mochitest/ajax/offline/445544.cacheManifest
index 0ffef2b9e22..1258eead2ff 100644
--- a/dom/tests/mochitest/ajax/offline/445544.cacheManifest
+++ b/dom/tests/mochitest/ajax/offline/445544.cacheManifest
@@ -1,7 +1,7 @@
 CACHE MANIFEST
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
 
 test_bug445544.html
 445544_part1.html
diff --git a/dom/tests/mochitest/ajax/offline/badManifestMagic.cacheManifest b/dom/tests/mochitest/ajax/offline/badManifestMagic.cacheManifest
index 9301bc5c9e8..2054737c898 100644
--- a/dom/tests/mochitest/ajax/offline/badManifestMagic.cacheManifest
+++ b/dom/tests/mochitest/ajax/offline/badManifestMagic.cacheManifest
@@ -1,4 +1,4 @@
 # This doesn't start with the magic cache manifest line.
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
diff --git a/dom/tests/mochitest/ajax/offline/fallback.cacheManifest b/dom/tests/mochitest/ajax/offline/fallback.cacheManifest
index 0872e0acb38..08c772b5b78 100644
--- a/dom/tests/mochitest/ajax/offline/fallback.cacheManifest
+++ b/dom/tests/mochitest/ajax/offline/fallback.cacheManifest
@@ -1,7 +1,7 @@
 CACHE MANIFEST
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
 
 FALLBACK:
 namespace1/ fallback.html
diff --git a/dom/tests/mochitest/ajax/offline/foreign2.html b/dom/tests/mochitest/ajax/offline/foreign2.html
index 7638418d90b..b0efa00ece6 100644
--- a/dom/tests/mochitest/ajax/offline/foreign2.html
+++ b/dom/tests/mochitest/ajax/offline/foreign2.html
@@ -1,4 +1,4 @@
-
+
 
 Foreign page 2
 
@@ -15,13 +15,13 @@ function manifestUpdated()
     .getService(Components.interfaces.nsIApplicationCacheService);
 
   var foreign2cache = appCacheService.chooseApplicationCache(
-    "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.html");
+    "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.html");
 
   OfflineTest.ok(foreign2cache, "Foreign 2 cache present, chosen for foreign2.html");
-  OfflineTest.is(foreign2cache.groupID, "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.cacheManifest")
+  OfflineTest.is(foreign2cache.groupID, "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.cacheManifest")
 
   var foreign1cache = appCacheService.getActiveCache(
-    "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/foreign1.cacheManifest");
+    "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/foreign1.cacheManifest");
   OfflineTest.ok(foreign1cache, "Foreign 1 cache loaded");
   foreign1cache.discard();
 
@@ -35,15 +35,15 @@ function onLoaded()
     .getService(Components.interfaces.nsIApplicationCacheService);
 
   var foreign1cache = appCacheService.getActiveCache(
-    "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/foreign1.cacheManifest");
+    "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/foreign1.cacheManifest");
   OfflineTest.ok(foreign1cache, "Foreign 1 cache loaded");
 
   var foreign2cache = appCacheService.getActiveCache(
-    "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.cacheManifest");
+    "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.cacheManifest");
   OfflineTest.ok(!foreign2cache, "Foreign 2 cache not present");
 
   foreign1cache = appCacheService.chooseApplicationCache(
-    "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.html");
+    "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/foreign2.html");
   OfflineTest.ok(!foreign1cache, "foreign2.html not chosen from foreign1 cache");
 
   try
diff --git a/dom/tests/mochitest/ajax/offline/manifestRedirect.sjs b/dom/tests/mochitest/ajax/offline/manifestRedirect.sjs
index 99eac6cea83..55326a4cf15 100644
--- a/dom/tests/mochitest/ajax/offline/manifestRedirect.sjs
+++ b/dom/tests/mochitest/ajax/offline/manifestRedirect.sjs
@@ -1,6 +1,6 @@
 function handleRequest(request, response)
 {
   response.setStatusLine(request.httpVersion, 307, "Moved temporarly");
-  response.setHeader("Location", "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/updating.cacheManifest");
+  response.setHeader("Location", "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/updating.cacheManifest");
   response.setHeader("Content-Type", "text/cache-manifest");
 }
diff --git a/dom/tests/mochitest/ajax/offline/missingFile.cacheManifest b/dom/tests/mochitest/ajax/offline/missingFile.cacheManifest
index 99635666efd..f2be3df1d0a 100644
--- a/dom/tests/mochitest/ajax/offline/missingFile.cacheManifest
+++ b/dom/tests/mochitest/ajax/offline/missingFile.cacheManifest
@@ -1,7 +1,7 @@
 CACHE MANIFEST
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
 
 # The following item doesn't exist, and will cause an update error.
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/doesntExist.html
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/doesntExist.html
diff --git a/dom/tests/mochitest/ajax/offline/obsolete.html b/dom/tests/mochitest/ajax/offline/obsolete.html
index 23c31b4a7fe..51dfb252460 100644
--- a/dom/tests/mochitest/ajax/offline/obsolete.html
+++ b/dom/tests/mochitest/ajax/offline/obsolete.html
@@ -50,7 +50,7 @@ applicationCache.oncached = function() {
 
   // Make the obsoleting.sjs return 404 NOT FOUND code
   var req = new XMLHttpRequest();
-  req.open("GET", "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/obsoletingManifest.sjs?state=");
+  req.open("GET", "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/obsoletingManifest.sjs?state=");
   var channel = req.channel
     .QueryInterface(Components.interfaces.nsIApplicationCacheChannel);
   channel.chooseApplicationCache = false;
diff --git a/dom/tests/mochitest/ajax/offline/overlap.cacheManifest b/dom/tests/mochitest/ajax/offline/overlap.cacheManifest
index 3b0b917d41b..6cb6702c58a 100644
--- a/dom/tests/mochitest/ajax/offline/overlap.cacheManifest
+++ b/dom/tests/mochitest/ajax/offline/overlap.cacheManifest
@@ -1,9 +1,9 @@
 CACHE MANIFEST
 
 CACHE:
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
 
 NETWORK:
 bogus/specific/
diff --git a/dom/tests/mochitest/ajax/offline/redirects.sjs b/dom/tests/mochitest/ajax/offline/redirects.sjs
index bbd3b561bdf..aafd37e2b59 100644
--- a/dom/tests/mochitest/ajax/offline/redirects.sjs
+++ b/dom/tests/mochitest/ajax/offline/redirects.sjs
@@ -2,28 +2,28 @@ ver1manifest =
   "CACHE MANIFEST\n" +
   "# v1\n" +
   "\n" +
-  "http://localhost:8888/tests/SimpleTest/SimpleTest.js\n" +
-  "http://localhost:8888/MochiKit/packed.js\n" +
-  "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js\n" +
-  "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/explicitRedirect.sjs";
+  "http://mochi.test:8888/tests/SimpleTest/SimpleTest.js\n" +
+  "http://mochi.test:8888/MochiKit/packed.js\n" +
+  "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js\n" +
+  "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/explicitRedirect.sjs";
 
 ver2manifest =
   "CACHE MANIFEST\n" +
   "# v2\n" +
   "\n" +
-  "http://localhost:8888/tests/SimpleTest/SimpleTest.js\n" +
-  "http://localhost:8888/MochiKit/packed.js\n" +
-  "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js\n" +
-  "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/explicitRedirect.sjs";
+  "http://mochi.test:8888/tests/SimpleTest/SimpleTest.js\n" +
+  "http://mochi.test:8888/MochiKit/packed.js\n" +
+  "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js\n" +
+  "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/explicitRedirect.sjs";
 
 ver3manifest =
   "CACHE MANIFEST\n" +
   "# v3\n" +
   "\n" +
-  "http://localhost:8888/tests/SimpleTest/SimpleTest.js\n" +
-  "http://localhost:8888/MochiKit/packed.js\n" +
-  "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js\n" +
-  "http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/explicitRedirect.sjs";
+  "http://mochi.test:8888/tests/SimpleTest/SimpleTest.js\n" +
+  "http://mochi.test:8888/MochiKit/packed.js\n" +
+  "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js\n" +
+  "http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/explicitRedirect.sjs";
 
 function handleRequest(request, response)
 {
diff --git a/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest b/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest
index 7699bad7751..c20d81289f3 100644
--- a/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest
+++ b/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest
@@ -1,11 +1,11 @@
 CACHE MANIFEST
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
 
 # The following item doesn't have the same scheme as the manifest, and
 # will be ignored.
-https://localhost:8888/MochiKit/packed.js
+https://mochi.test:8888/MochiKit/packed.js
 
 # The following item is not a valid URI and will be ignored
 bad:/uri/invalid
diff --git a/dom/tests/mochitest/ajax/offline/simpleManifest.notmanifest b/dom/tests/mochitest/ajax/offline/simpleManifest.notmanifest
index af51becdbd1..ae508d49155 100644
--- a/dom/tests/mochitest/ajax/offline/simpleManifest.notmanifest
+++ b/dom/tests/mochitest/ajax/offline/simpleManifest.notmanifest
@@ -1,12 +1,12 @@
 CACHE MANIFEST
 
-http://localhost:8888/tests/SimpleTest/SimpleTest.js
-http://localhost:8888/MochiKit/packed.js
-http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
+http://mochi.test:8888/tests/SimpleTest/SimpleTest.js
+http://mochi.test:8888/MochiKit/packed.js
+http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js
 
 # The following item doesn't have the same scheme as the manifest, and
 # will be ignored.
-https://localhost:8888/MochiKit/packed.js
+https://mochi.test:8888/MochiKit/packed.js
 
 # The following item is not a valid URI and will be ignored
 bad:/uri/invalid
diff --git a/dom/tests/mochitest/ajax/offline/test_badManifestMagic.html b/dom/tests/mochitest/ajax/offline/test_badManifestMagic.html
index 525afaa5d5a..9947bb68b87 100644
--- a/dom/tests/mochitest/ajax/offline/test_badManifestMagic.html
+++ b/dom/tests/mochitest/ajax/offline/test_badManifestMagic.html
@@ -1,4 +1,4 @@
-
+
 
 bad manifest magic
 
@@ -17,9 +17,9 @@ function handleError() {
 
   // These items are listed in the manifest, but the error should have
   // prevented them from being committed to the cache.
-  OfflineTest.checkCache("http://localhost:8888/tests/SimpleTest/SimpleTest.js", false);
-  OfflineTest.checkCache("http://localhost:8888/MochiKit/packed.js", false);
-  OfflineTest.checkCache("http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", false);
+  OfflineTest.checkCache("http://mochi.test:8888/tests/SimpleTest/SimpleTest.js", false);
+  OfflineTest.checkCache("http://mochi.test:8888/MochiKit/packed.js", false);
+  OfflineTest.checkCache("http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", false);
 
   OfflineTest.teardown();
   OfflineTest.finish();
diff --git a/dom/tests/mochitest/ajax/offline/test_badManifestMime.html b/dom/tests/mochitest/ajax/offline/test_badManifestMime.html
index f2120c1f9b3..e1403378540 100644
--- a/dom/tests/mochitest/ajax/offline/test_badManifestMime.html
+++ b/dom/tests/mochitest/ajax/offline/test_badManifestMime.html
@@ -1,4 +1,4 @@
-
+
 
 bad manifest content type
 
@@ -17,9 +17,9 @@ function handleError() {
 
   // These items are listed in the manifest, but the error should have
   // prevented them from being committed to the cache.
-  OfflineTest.checkCache("http://localhost:8888/tests/SimpleTest/SimpleTest.js", false);
-  OfflineTest.checkCache("http://localhost:8888/MochiKit/packed.js", false);
-  OfflineTest.checkCache("http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", false);
+  OfflineTest.checkCache("http://mochi.test:8888/tests/SimpleTest/SimpleTest.js", false);
+  OfflineTest.checkCache("http://mochi.test:8888/MochiKit/packed.js", false);
+  OfflineTest.checkCache("http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/offlineTests.js", false);
 
   OfflineTest.teardown();
   OfflineTest.finish();
diff --git a/dom/tests/mochitest/ajax/offline/test_bug460353.html b/dom/tests/mochitest/ajax/offline/test_bug460353.html
index dd05ab7bef7..1825598fcd1 100644
--- a/dom/tests/mochitest/ajax/offline/test_bug460353.html
+++ b/dom/tests/mochitest/ajax/offline/test_bug460353.html
@@ -1,4 +1,4 @@
-
+
 
 Bug 460353
 
@@ -81,8 +81,8 @@ function finish()
             .newURI(window.location.href, null, null);
   pm.remove(uri.host, "offline-app");
 
-  cleanCache("http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest");
-  cleanCache("http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/updatingManifest.sjs");
+  cleanCache("http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/simpleManifest.cacheManifest");
+  cleanCache("http://mochi.test:8888/tests/dom/tests/mochitest/ajax/offline/updatingManifest.sjs");
 
   SimpleTest.finish();
 }
diff --git a/dom/tests/mochitest/ajax/offline/test_bug474696.html b/dom/tests/mochitest/ajax/offline/test_bug474696.html
index 378b537cfdd..ad539ac8243 100644
--- a/dom/tests/mochitest/ajax/offline/test_bug474696.html
+++ b/dom/tests/mochitest/ajax/offline/test_bug474696.html
@@ -1,4 +1,4 @@
-
+
 
 Fallback on different origin redirect test
 
@@ -8,10 +8,9 @@
 
 
 
diff --git a/dom/tests/mochitest/bugs/bug346659-opener-echoer.html b/dom/tests/mochitest/bugs/bug346659-opener-echoer.html
index 441b3f66f51..49c04cc2402 100644
--- a/dom/tests/mochitest/bugs/bug346659-opener-echoer.html
+++ b/dom/tests/mochitest/bugs/bug346659-opener-echoer.html
@@ -1,6 +1,6 @@
 
diff --git a/dom/tests/mochitest/bugs/bug346659-opener.html b/dom/tests/mochitest/bugs/bug346659-opener.html
index 208371acb87..52facb07a22 100644
--- a/dom/tests/mochitest/bugs/bug346659-opener.html
+++ b/dom/tests/mochitest/bugs/bug346659-opener.html
@@ -8,7 +8,7 @@
       } else if ("write" in cmd) {
         window.testNum = cmd.write;
       }
-      window.opener.postMessage(s, "http://localhost:8888/");
+      window.opener.postMessage(s, "http://mochi.test:8888");
     }
     var childWin = window.open();
   
diff --git a/dom/tests/mochitest/bugs/bug346659-parent-echoer.html b/dom/tests/mochitest/bugs/bug346659-parent-echoer.html
index 83513efc2cf..eefb44c70ea 100644
--- a/dom/tests/mochitest/bugs/bug346659-parent-echoer.html
+++ b/dom/tests/mochitest/bugs/bug346659-parent-echoer.html
@@ -1,5 +1,5 @@
 
diff --git a/dom/tests/mochitest/bugs/bug346659-parent.html b/dom/tests/mochitest/bugs/bug346659-parent.html
index f0a86e7a516..0fea91c6997 100644
--- a/dom/tests/mochitest/bugs/bug346659-parent.html
+++ b/dom/tests/mochitest/bugs/bug346659-parent.html
@@ -10,7 +10,7 @@
       } else if ("write" in cmd) {
         window.testNum = cmd.write;
       }
-      window.opener.postMessage(s, "http://localhost:8888/");
+      window.opener.postMessage(s, "http://mochi.test:8888");
     }
   
   
diff --git a/dom/tests/mochitest/bugs/child_bug260264.html b/dom/tests/mochitest/bugs/child_bug260264.html
index 19c4918014b..12cde3eb26f 100644
--- a/dom/tests/mochitest/bugs/child_bug260264.html
+++ b/dom/tests/mochitest/bugs/child_bug260264.html
@@ -6,7 +6,7 @@
     
     
   
diff --git a/dom/tests/mochitest/bugs/file_bug504862.html b/dom/tests/mochitest/bugs/file_bug504862.html
index c253c736e04..c1ce576f78d 100644
--- a/dom/tests/mochitest/bugs/file_bug504862.html
+++ b/dom/tests/mochitest/bugs/file_bug504862.html
@@ -3,7 +3,7 @@
 
 

Move on, nothing to see here...

diff --git a/dom/tests/mochitest/bugs/iframe_bug463000.html b/dom/tests/mochitest/bugs/iframe_bug463000.html index 0357868f85d..d2b12f8fbae 100644 --- a/dom/tests/mochitest/bugs/iframe_bug463000.html +++ b/dom/tests/mochitest/bugs/iframe_bug463000.html @@ -141,7 +141,7 @@ function run() prefBranch.clearUserPref("browser.privatebrowsing.keep_current_session"); - window.parent.postMessage(message, "http://localhost:8888"); + window.parent.postMessage(message, "http://mochi.test:8888"); } window.addEventListener("load", run, false); diff --git a/dom/tests/mochitest/bugs/test_bug132255.html b/dom/tests/mochitest/bugs/test_bug132255.html index 559c007e003..f71ac98aeb0 100644 --- a/dom/tests/mochitest/bugs/test_bug132255.html +++ b/dom/tests/mochitest/bugs/test_bug132255.html @@ -8,7 +8,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=132255 - + Mozilla Bug 132255 diff --git a/dom/tests/mochitest/bugs/test_bug346659.html b/dom/tests/mochitest/bugs/test_bug346659.html index 8919f27020c..77a7f7a14a1 100644 --- a/dom/tests/mochitest/bugs/test_bug346659.html +++ b/dom/tests/mochitest/bugs/test_bug346659.html @@ -70,9 +70,9 @@ function handleCmd(evt) { win.childWin.x = testNum; try { if (win.childWin.opener == win) { - win.childWin.document.write(' diff --git a/dom/tests/mochitest/localstorage/interOriginFrame.js b/dom/tests/mochitest/localstorage/interOriginFrame.js index ba8e2c422ea..c24ddc07d04 100644 --- a/dom/tests/mochitest/localstorage/interOriginFrame.js +++ b/dom/tests/mochitest/localstorage/interOriginFrame.js @@ -1,6 +1,6 @@ function postMsg(message) { - parent.postMessage(message, "http://localhost:8888"); + parent.postMessage(message, "http://mochi.test:8888"); } window.addEventListener("message", onMessageReceived, false); diff --git a/dom/tests/mochitest/localstorage/test_localStorageKeyOrder.html b/dom/tests/mochitest/localstorage/test_localStorageKeyOrder.html index 979a43e309a..6a97c8908c7 100644 --- a/dom/tests/mochitest/localstorage/test_localStorageKeyOrder.html +++ b/dom/tests/mochitest/localstorage/test_localStorageKeyOrder.html @@ -54,7 +54,7 @@ function startTest() is(keyNames[i], localStorage.key(i), "key "+keyNames[i]+" on same index"); keyNamesStringify = "[\"" + keyNames.join("\",\"") + "\"]"; - frame.location = "http://localhost:8888/tests/dom/tests/mochitest/localstorage/frameOrder.html?" + + frame.location = "http://mochi.test:8888/tests/dom/tests/mochitest/localstorage/frameOrder.html?" + keyNamesStringify; } catch (ex) diff --git a/dom/tests/mochitest/sessionstorage/file_http.html b/dom/tests/mochitest/sessionstorage/file_http.html index 4f151e87f35..e8614dd542c 100644 --- a/dom/tests/mochitest/sessionstorage/file_http.html +++ b/dom/tests/mochitest/sessionstorage/file_http.html @@ -6,7 +6,7 @@ window.addEventListener("message", onMessageReceived, false); function postMsg(msg) { - parent.postMessage(msg, "http://localhost:8888"); + parent.postMessage(msg, "http://mochi.test:8888"); } function onMessageReceived(event) diff --git a/dom/tests/mochitest/sessionstorage/file_https.html b/dom/tests/mochitest/sessionstorage/file_https.html index 90c9427c083..915c54950ee 100644 --- a/dom/tests/mochitest/sessionstorage/file_https.html +++ b/dom/tests/mochitest/sessionstorage/file_https.html @@ -5,7 +5,7 @@ function start() { sessionStorage.setItem("foo-https", "secure"); parent.postMessage(sessionStorage.getItem("foo-https"), - "http://localhost:8888"); + "http://mochi.test:8888"); } diff --git a/dom/tests/mochitest/sessionstorage/frameReplace.html b/dom/tests/mochitest/sessionstorage/frameReplace.html index 344164e8798..bf5579c7185 100644 --- a/dom/tests/mochitest/sessionstorage/frameReplace.html +++ b/dom/tests/mochitest/sessionstorage/frameReplace.html @@ -9,17 +9,17 @@ var shell; function ok(a, message) { if (!a) - shell.postMessage("FAILURE: " + message, "http://localhost:8888"); + shell.postMessage("FAILURE: " + message, "http://mochi.test:8888"); else - shell.postMessage(message, "http://localhost:8888"); + shell.postMessage(message, "http://mochi.test:8888"); } function is(a, b, message) { if (a != b) - shell.postMessage("FAILURE: " + message + ", expected "+b+" got "+a, "http://localhost:8888"); + shell.postMessage("FAILURE: " + message + ", expected "+b+" got "+a, "http://mochi.test:8888"); else - shell.postMessage(message + ", expected "+b+" got "+a, "http://localhost:8888"); + shell.postMessage(message + ", expected "+b+" got "+a, "http://mochi.test:8888"); } function doTest() @@ -64,7 +64,7 @@ function doTest() break; } - shell.postMessage(action + "_done", "http://localhost:8888"); + shell.postMessage(action + "_done", "http://mochi.test:8888"); } diff --git a/dom/tests/mochitest/sessionstorage/interOriginSlave.js b/dom/tests/mochitest/sessionstorage/interOriginSlave.js index 265daad470d..e3b3cdbb342 100644 --- a/dom/tests/mochitest/sessionstorage/interOriginSlave.js +++ b/dom/tests/mochitest/sessionstorage/interOriginSlave.js @@ -1,6 +1,6 @@ function postMsg(message) { - opener.postMessage(message, "http://localhost:8888"); + opener.postMessage(message, "http://mochi.test:8888"); } window.addEventListener("message", onMessageReceived, false); diff --git a/dom/tests/mochitest/sessionstorage/test_sessionStorageClone.html b/dom/tests/mochitest/sessionstorage/test_sessionStorageClone.html index 49f34a7664c..ee1672d14fb 100644 --- a/dom/tests/mochitest/sessionstorage/test_sessionStorageClone.html +++ b/dom/tests/mochitest/sessionstorage/test_sessionStorageClone.html @@ -32,7 +32,7 @@ function doNextTest() case 1: // Open a window from the same origin and check data // are copied but not further modified on our side - slaveOrigin = "http://localhost:8888"; + slaveOrigin = "http://mochi.test:8888"; slave = window.open(slaveOrigin + slavePath + "frameEqual.html"); break; diff --git a/dom/tests/mochitest/whatwg/postMessage.jar b/dom/tests/mochitest/whatwg/postMessage.jar index e7861c7da51..d4ee4abc3d1 100644 Binary files a/dom/tests/mochitest/whatwg/postMessage.jar and b/dom/tests/mochitest/whatwg/postMessage.jar differ diff --git a/dom/tests/mochitest/whatwg/postMessage_closed_helper.html b/dom/tests/mochitest/whatwg/postMessage_closed_helper.html index cb4d26b592f..240ae57b892 100644 --- a/dom/tests/mochitest/whatwg/postMessage_closed_helper.html +++ b/dom/tests/mochitest/whatwg/postMessage_closed_helper.html @@ -15,7 +15,7 @@ function setup() var query = location.search.substring(1); if (query == "opener") - window.opener.postMessage("message", "http://localhost:8888"); + window.opener.postMessage("message", "http://mochi.test:8888"); } window.addEventListener("load", setup, false); diff --git a/dom/tests/mochitest/whatwg/postMessage_hash.html b/dom/tests/mochitest/whatwg/postMessage_hash.html index 3427cb43fe1..adb82aa5f97 100644 --- a/dom/tests/mochitest/whatwg/postMessage_hash.html +++ b/dom/tests/mochitest/whatwg/postMessage_hash.html @@ -7,10 +7,10 @@ function receiveMessage(evt) { var response = "response-message"; - if (window.location.href !== "http://localhost:8888/tests/dom/tests/mochitest/whatwg/postMessage_hash.html#hash") + if (window.location.href !== "http://mochi.test:8888/tests/dom/tests/mochitest/whatwg/postMessage_hash.html#hash") response += " kid-at-wrong-uri(" + window.location.href + ")"; - if (evt.origin !== "http://localhost:8888") + if (evt.origin !== "http://mochi.test:8888") response += " wrong-origin(" + evt.origin + ")"; if (evt.source !== window.parent) response += " wrong-source"; @@ -19,7 +19,7 @@ function receiveMessage(evt) if (evt.lastEventId !== "") response += " wrong-lastEventId(" + evt.lastEventId + ")"; - window.parent.postMessage(response, "http://localhost:8888"); + window.parent.postMessage(response, "http://mochi.test:8888"); } window.addEventListener("message", receiveMessage, false); diff --git a/dom/tests/mochitest/whatwg/postMessage_helper.html b/dom/tests/mochitest/whatwg/postMessage_helper.html index d11f609789d..86e34e9d4a8 100644 --- a/dom/tests/mochitest/whatwg/postMessage_helper.html +++ b/dom/tests/mochitest/whatwg/postMessage_helper.html @@ -47,7 +47,7 @@ else { response += " unexpected-message-to(" + window.location.href + ")"; - window.parent.postMessage(response, "http://localhost:8888"); + window.parent.postMessage(response, "http://mochi.test:8888"); return; } } @@ -57,7 +57,7 @@ var source = evt.source; try { - if (evt.origin != "http://localhost:8888") + if (evt.origin != "http://mochi.test:8888") response += " unexpected-origin(" + evt.origin + ")"; try @@ -82,7 +82,7 @@ function receiveCross(evt, response) { var source = evt.source; - if (evt.origin != "http://localhost:8888") + if (evt.origin != "http://mochi.test:8888") response += " unexpected-origin(" + evt.origin + ")"; try diff --git a/dom/tests/mochitest/whatwg/postMessage_idn_helper.html b/dom/tests/mochitest/whatwg/postMessage_idn_helper.html index e87e5ca545d..c66932280c0 100644 --- a/dom/tests/mochitest/whatwg/postMessage_idn_helper.html +++ b/dom/tests/mochitest/whatwg/postMessage_idn_helper.html @@ -9,7 +9,7 @@ if (!(evt instanceof MessageEvent)) response += " not-a-MessageEvent"; - if (evt.origin !== "http://localhost:8888") + if (evt.origin !== "http://mochi.test:8888") response += " wrong-sender-origin(" + evt.origin + ")"; if (evt.data !== "idn-message") response += " wrong-data(" + evt.data + ")"; diff --git a/dom/tests/mochitest/whatwg/postMessage_joined_helper.html b/dom/tests/mochitest/whatwg/postMessage_joined_helper.html index 1c88223e023..83988d103a0 100644 --- a/dom/tests/mochitest/whatwg/postMessage_joined_helper.html +++ b/dom/tests/mochitest/whatwg/postMessage_joined_helper.html @@ -14,7 +14,7 @@ http://sub1.test1.example.org/tests/dom/tests/mochitest/whatwg/postMessage_joine if (data === "subframe-test-finished") { target = window.parent; - providedOrigin = "http://localhost:8888"; + providedOrigin = "http://mochi.test:8888"; response = "test-passed"; } else if (data === "start-test") @@ -26,7 +26,7 @@ http://sub1.test1.example.org/tests/dom/tests/mochitest/whatwg/postMessage_joine else { target = window.parent; - providedOrigin = "http://localhost:8888"; + providedOrigin = "http://mochi.test:8888"; response = "not reached"; } @@ -51,7 +51,7 @@ http://sub1.test1.example.org/tests/dom/tests/mochitest/whatwg/postMessage_joine if (data == "subframe-test-finished") origin = "http://example.org"; else if (data === "start-test") - origin = "http://localhost:8888"; + origin = "http://mochi.test:8888"; else origin = "unreached"; diff --git a/dom/tests/mochitest/whatwg/postMessage_onOther.html b/dom/tests/mochitest/whatwg/postMessage_onOther.html index 8dfa4f06d99..dd4cf370a18 100644 --- a/dom/tests/mochitest/whatwg/postMessage_onOther.html +++ b/dom/tests/mochitest/whatwg/postMessage_onOther.html @@ -50,7 +50,7 @@ function receiveSubDomain(evt) { - if (evt.origin !== "http://localhost:8888") + if (evt.origin !== "http://mochi.test:8888") { fail("wrong top-domain origin: " + evt.origin); return; @@ -90,7 +90,7 @@ function testSiblingPostMessage() { - window.parent.postMessage("test-finished", "http://localhost:8888"); + window.parent.postMessage("test-finished", "http://mochi.test:8888"); } function setup() diff --git a/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml b/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml index 0784980fb45..9dd00c1ee29 100644 --- a/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml +++ b/dom/tests/mochitest/whatwg/postMessage_origin_helper.xhtml @@ -7,14 +7,14 @@ function receiveMessage(evt) { var response = "PASS"; - if (evt.origin !== "http://localhost:8888") + if (evt.origin !== "http://mochi.test:8888") response += " wrong-origin(" + evt.origin + ")"; if (evt.source !== window.parent) response += " wrong-source"; if (evt.data !== "PASS") response += " wrong-data(" + evt.data + ")"; - window.parent.postMessage(response, "http://localhost:8888"); + window.parent.postMessage(response, "http://mochi.test:8888"); } window.addEventListener("message", receiveMessage, false); diff --git a/dom/tests/mochitest/whatwg/postMessage_override_helper.html b/dom/tests/mochitest/whatwg/postMessage_override_helper.html index 089d1876733..ffe5d628aa3 100644 --- a/dom/tests/mochitest/whatwg/postMessage_override_helper.html +++ b/dom/tests/mochitest/whatwg/postMessage_override_helper.html @@ -22,7 +22,7 @@ }; } - window.parent.postMessage(evt.data, "http://localhost:8888"); + window.parent.postMessage(evt.data, "http://mochi.test:8888"); } function setup() diff --git a/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html b/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html index 25309e6bcb0..fab25b59d7c 100644 --- a/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html +++ b/dom/tests/mochitest/whatwg/postMessage_userpass_helper.html @@ -3,11 +3,12 @@ Username/password page for postMessage tests - + Mozilla Bug 430251

-
@@ -27,7 +27,7 @@ SimpleTest.waitForExplicitFinish();
 
 function receiveMessage(evt)
 {
-  is(evt.origin, "http://example.com", "wrong sender");
+  is(evt.origin, "http://mochi.test:8888", "wrong sender");
   ok(evt.source === window.frames.kid, "wrong source");
 
   is(evt.data, "finish-test", "wrong data");
@@ -40,7 +40,7 @@ window.addEventListener("message", receiveMessage, false);
 
 function run()
 {
-  window.frames.kid.postMessage("start-test", "http://example.com");
+  window.frames.kid.postMessage("start-test", "http://mochi.test:8888");
 }
 
 window.addEventListener("load", run, false);
diff --git a/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml b/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml
index 854eda53113..661c38016d0 100644
--- a/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml
+++ b/dom/tests/mochitest/whatwg/test_postMessage_origin.xhtml
@@ -15,13 +15,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=417075
 

- - @@ -30,7 +30,7 @@ function atLoad() { try { - sameDomain.postMessage("foo", "http://localhost:8888"); + sameDomain.postMessage("foo", "http://mochi.test:8888"); ok(true, "should not have thrown for same-domain exception"); } catch (e) diff --git a/extensions/cookie/test/file_domain_inner.html b/extensions/cookie/test/file_domain_inner.html index a34913bae4b..1a05c45f801 100644 --- a/extensions/cookie/test/file_domain_inner.html +++ b/extensions/cookie/test/file_domain_inner.html @@ -6,7 +6,7 @@ document.cookie = "can=has"; // send a message to our test document, to say we're done loading - window.opener.postMessage("message", "http://localhost:8888"); + window.opener.postMessage("message", "http://mochi.test:8888"); diff --git a/extensions/cookie/test/file_domain_inner_inner.html b/extensions/cookie/test/file_domain_inner_inner.html index f36b7f5c17a..7bc0e44a98b 100644 --- a/extensions/cookie/test/file_domain_inner_inner.html +++ b/extensions/cookie/test/file_domain_inner_inner.html @@ -6,7 +6,7 @@ document.cookie = "can2=has2"; // send a message to our test document, to say we're done loading - window.parent.opener.postMessage("message", "http://localhost:8888"); + window.parent.opener.postMessage("message", "http://mochi.test:8888"); diff --git a/extensions/cookie/test/file_image_inner.html b/extensions/cookie/test/file_image_inner.html index 7dceeb4978d..aada82d71af 100644 --- a/extensions/cookie/test/file_image_inner.html +++ b/extensions/cookie/test/file_image_inner.html @@ -6,7 +6,7 @@ document.cookie = "can=has"; // send a message to our test document, to say we're done loading - window.opener.postMessage("message", "http://localhost:8888"); + window.opener.postMessage("message", "http://mochi.test:8888"); diff --git a/extensions/cookie/test/file_image_inner_inner.html b/extensions/cookie/test/file_image_inner_inner.html index fe2cb1f1fd9..1989b53de72 100644 --- a/extensions/cookie/test/file_image_inner_inner.html +++ b/extensions/cookie/test/file_image_inner_inner.html @@ -9,7 +9,7 @@ document.cookie = "can2=has2"; // send a message to our test document, to say we're done loading - window.parent.opener.postMessage("message", "http://localhost:8888"); + window.parent.opener.postMessage("message", "http://mochi.test:8888"); } diff --git a/extensions/cookie/test/file_loadflags_inner.html b/extensions/cookie/test/file_loadflags_inner.html index 019d5d84d6d..7a2df56081e 100644 --- a/extensions/cookie/test/file_loadflags_inner.html +++ b/extensions/cookie/test/file_loadflags_inner.html @@ -7,7 +7,7 @@ document.cookie = "can=has"; // send a message to our test document, to say we're done loading - window.opener.postMessage("f_lf_i msg data", "http://localhost:8888"); + window.opener.postMessage("f_lf_i msg data", "http://mochi.test:8888"); } diff --git a/extensions/cookie/test/file_localhost_inner.html b/extensions/cookie/test/file_localhost_inner.html index dca27f08a71..db9917f0009 100644 --- a/extensions/cookie/test/file_localhost_inner.html +++ b/extensions/cookie/test/file_localhost_inner.html @@ -6,9 +6,9 @@ document.cookie = "can=has"; // send a message to our test document, to say we're done loading - window.opener.postMessage("message", "http://localhost:8888"); + window.opener.postMessage("message", "http://mochi.test:8888"); - + diff --git a/extensions/cookie/test/file_loopback_inner.html b/extensions/cookie/test/file_loopback_inner.html index 0b72126f25f..e6c115c50b7 100644 --- a/extensions/cookie/test/file_loopback_inner.html +++ b/extensions/cookie/test/file_loopback_inner.html @@ -6,7 +6,7 @@ document.cookie = "can=has"; // send a message to our test document, to say we're done loading - window.opener.postMessage("message", "http://localhost:8888"); + window.opener.postMessage("message", "http://mochi.test:8888"); diff --git a/extensions/cookie/test/file_subdomain_inner.html b/extensions/cookie/test/file_subdomain_inner.html index 084fa5af162..5f608b81100 100644 --- a/extensions/cookie/test/file_subdomain_inner.html +++ b/extensions/cookie/test/file_subdomain_inner.html @@ -6,7 +6,7 @@ document.cookie = "can=has"; // send a message to our test document, to say we're done loading - window.opener.postMessage("message", "http://localhost:8888"); + window.opener.postMessage("message", "http://mochi.test:8888"); diff --git a/extensions/cookie/test/test_same_base_domain_4.html b/extensions/cookie/test/test_same_base_domain_4.html index 3063f17a3aa..c7433365411 100644 --- a/extensions/cookie/test/test_same_base_domain_4.html +++ b/extensions/cookie/test/test_same_base_domain_4.html @@ -6,7 +6,7 @@ - +

 
diff --git a/netwerk/test/httpserver/httpd.js b/netwerk/test/httpserver/httpd.js
index 41ae8465d27..4d414f2c2fb 100644
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -501,6 +501,11 @@ nsHttpServer.prototype =
   // see nsIHttpServer.start
   //
   start: function(port)
+  {
+    this._start(port, "localhost")
+  },
+
+  _start: function(port, host)
   {
     if (this._socket)
       throw Cr.NS_ERROR_ALREADY_INITIALIZED;
@@ -508,6 +513,8 @@ nsHttpServer.prototype =
     this._port = port;
     this._doQuit = this._socketClosed = false;
 
+    this._host = host;
+
     // The listen queue needs to be long enough to handle
     // network.http.max-connections-per-server concurrent connections,
     // plus a safety margin in case some other process is talking to
@@ -518,13 +525,18 @@ nsHttpServer.prototype =
 
     try
     {
+      var loopback = true;
+      if (this._host != "127.0.0.1" && this._host != "localhost") {
+        var loopback = false;
+      }
+
       var socket = new ServerSocket(this._port,
-                                    true, // loopback only
+                                    loopback, // true = localhost, false = everybody
                                     maxConnections);
       dumpn(">>> listening on port " + socket.port + ", " + maxConnections +
             " pending connections");
       socket.asyncListen(this);
-      this._identity._initialize(port, true);
+      this._identity._initialize(port, host, true);
       this._socket = socket;
     }
     catch (e)
@@ -921,7 +933,7 @@ ServerIdentity.prototype =
       // Always keep at least one identity in existence at any time, unless
       // we're in the process of shutting down (the last condition above).
       this._primaryPort = -1;
-      this._initialize(this._defaultPort, false);
+      this._initialize(this._defaultPort, host, false);
     }
 
     return present;
@@ -987,16 +999,17 @@ ServerIdentity.prototype =
    * Initializes the primary name for the corresponding server, based on the
    * provided port number.
    */
-  _initialize: function(port, addSecondaryDefault)
+  _initialize: function(port, host, addSecondaryDefault)
   {
+    this._host = host;
     if (this._primaryPort !== -1)
-      this.add("http", "localhost", port);
+      this.add("http", host, port);
     else
       this.setPrimary("http", "localhost", port);
     this._defaultPort = port;
 
     // Only add this if we're being called at server startup
-    if (addSecondaryDefault)
+    if (addSecondaryDefault && host != "127.0.0.1")
       this.add("http", "127.0.0.1", port);
   },
 
@@ -1007,20 +1020,22 @@ ServerIdentity.prototype =
    */
   _teardown: function()
   {
-    // Not the default primary location, nothing special to do here
-    this.remove("http", "127.0.0.1", this._defaultPort);
-
+    if (this._host != "127.0.0.1") {
+      // Not the default primary location, nothing special to do here
+      this.remove("http", "127.0.0.1", this._defaultPort);
+    }
+    
     // This is a *very* tricky bit of reasoning here; make absolutely sure the
     // tests for this code pass before you commit changes to it.
     if (this._primaryScheme == "http" &&
-        this._primaryHost == "localhost" &&
+        this._primaryHost == this._host &&
         this._primaryPort == this._defaultPort)
     {
       // Make sure we don't trigger the readding logic in .remove(), then remove
       // the default location.
       var port = this._defaultPort;
       this._defaultPort = -1;
-      this.remove("http", "localhost", port);
+      this.remove("http", this._host, port);
 
       // Ensure a server start triggers the setPrimary() path in ._initialize()
       this._primaryPort = -1;
@@ -1028,7 +1043,7 @@ ServerIdentity.prototype =
     else
     {
       // No reason not to remove directly as it's not our primary location
-      this.remove("http", "localhost", this._defaultPort);
+      this.remove("http", this._host, this._defaultPort);
     }
   },
 
diff --git a/security/manager/ssl/tests/mochitest/bugs/test_bug480619.html b/security/manager/ssl/tests/mochitest/bugs/test_bug480619.html
index a5695364d10..1e759b2d89a 100644
--- a/security/manager/ssl/tests/mochitest/bugs/test_bug480619.html
+++ b/security/manager/ssl/tests/mochitest/bugs/test_bug480619.html
@@ -52,7 +52,7 @@ var sink = {
   }
 };
 
-var transport = socketTransportService.createTransport(["ssl"], 1, "localhost", 4443, null);
+var transport = socketTransportService.createTransport(["ssl"], 1, "127.0.0.1", 4443, null);
 
 transport.setEventSink(sink, currentThread);
 
diff --git a/security/manager/ssl/tests/mochitest/mixedcontent/mixedContentTest.js b/security/manager/ssl/tests/mochitest/mixedcontent/mixedContentTest.js
index 888b56c2936..327a388f102 100644
--- a/security/manager/ssl/tests/mochitest/mixedcontent/mixedContentTest.js
+++ b/security/manager/ssl/tests/mochitest/mixedcontent/mixedContentTest.js
@@ -107,7 +107,7 @@ function onMessageReceived(event)
 
 function postMsg(message)
 {
-  opener.postMessage(message, "http://localhost:8888");
+  opener.postMessage(message, "http://mochi.test:8888");
 }
 
 function finish()
diff --git a/testing/mochitest/runtests.py.in b/testing/mochitest/runtests.py.in
index a59eeb20f51..e8f08a67cfd 100644
--- a/testing/mochitest/runtests.py.in
+++ b/testing/mochitest/runtests.py.in
@@ -226,6 +226,7 @@ class MochitestServer:
     self._xrePath = options.xrePath
     self._profileDir = profileDir
     self.shutdownURL = shutdownURL
+    self.webServer = "127.0.0.1"
 
   def start(self):
     "Run the Mochitest server, returning the process ID of the server."
@@ -238,6 +239,7 @@ class MochitestServer:
     args = ["-g", self._xrePath,
             "-v", "170",
             "-f", "./" + "httpd.js",
+            '-e', 'const _SERVER_ADDR="' + self.webServer + '";',
             "-f", "./" + "server.js"]
 
     xpcshell = os.path.join(self._utilityPath,
@@ -276,7 +278,7 @@ class MochitestServer:
 
 class Mochitest(object):
   # Path to the test script on the server
-  TEST_SERVER_HOST = "localhost:8888"
+  TEST_SERVER_HOST = "mochi.test:8888"
   TEST_PATH = "/tests/"
   CHROME_PATH = "/redirect.html";
   A11Y_PATH = "/redirect-a11y.html"
diff --git a/testing/mochitest/server.js b/testing/mochitest/server.js
index e274b61623a..46fc9873e19 100644
--- a/testing/mochitest/server.js
+++ b/testing/mochitest/server.js
@@ -50,6 +50,8 @@ let (ios = Cc["@mozilla.org/network/io-service;1"]
 }
 
 const SERVER_PORT = 8888;
+var gServerAddress = "127.0.0.1";
+
 var server; // for use in the shutdown handler, if necessary
 
 //
@@ -150,7 +152,29 @@ function runServer()
 {
   serverBasePath = __LOCATION__.parent;
   server = createMochitestServer(serverBasePath);
-  server.start(SERVER_PORT);
+
+  //verify server address
+  //if a.b.c.d or 'localhost'
+  if (typeof(_SERVER_ADDR) != "undefined") {
+    if (_SERVER_ADDR == "localhost") {
+      gServerAddress = _SERVER_ADDR;      
+    } else {
+      var quads = _SERVER_ADDR.split('.');
+      if (quads.length == 4) {
+        var invalid = false;
+        for (var i=0; i < 4; i++) {
+          if (quads[i] < 0 || quads[i] > 255)
+            invalid = true;
+        }
+        if (!invalid)
+          gServerAddress = _SERVER_ADDR;
+        else
+          dumpn("WARNING: invalid server address ('" + _SERVER_ADDR + "'), using localhost");
+      }
+    }
+  }
+
+  server._start(SERVER_PORT, gServerAddress);
 
   // touch a file in the profile directory to indicate we're alive
   var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py
index 77ee849a52d..6ee15f7d1a1 100644
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -215,6 +215,7 @@ class XPCShellTests(object):
       cmdT = ", ".join(['"' + f.replace('\\', '/') + '"'
                  for f in testTailFiles])
       cmdH = xpcsCmd + \
+                ['-e', 'const _SERVER_ADDR = "localhost";'] + \
                 ['-e', 'const _HEAD_FILES = [%s];' % cmdH] + \
                 ['-e', 'const _TAIL_FILES = [%s];' % cmdT]
 
diff --git a/toolkit/components/microformats/tests/test_Microformats_hCalendar.html b/toolkit/components/microformats/tests/test_Microformats_hCalendar.html
index 59c438f859f..e25b52fbbe0 100644
--- a/toolkit/components/microformats/tests/test_Microformats_hCalendar.html
+++ b/toolkit/components/microformats/tests/test_Microformats_hCalendar.html
@@ -230,7 +230,7 @@ function test_hCard() {
   is(hcalendar.location, "Argent Hotel, San Francisco, CA", "05-calendar-simple - location");
 
   hcalendar = new hCalendar(document.getElementById("06-component-vevent-uri-relative"));
-  is(hcalendar.url, "http://localhost:8888/squidlist/calendar/12279/2006/1/15", "06-component-vevent-uri-relative - url");
+  is(hcalendar.url, "http://mochi.test:8888/squidlist/calendar/12279/2006/1/15", "06-component-vevent-uri-relative - url");
   is(hcalendar.summary, "Bad Movie Night - Gigli (blame mike spiegelman)", "06-component-vevent-uri-relative - summary");
   is(hcalendar.dtstart, "2006-01-15T00:00:00", "06-component-vevent-uri-relative - dtstart");
 
diff --git a/toolkit/components/microformats/tests/test_Microformats_hCard.html b/toolkit/components/microformats/tests/test_Microformats_hCard.html
index 6edd2d16f35..edaf3785a00 100644
--- a/toolkit/components/microformats/tests/test_Microformats_hCard.html
+++ b/toolkit/components/microformats/tests/test_Microformats_hCard.html
@@ -88,13 +88,13 @@
   

John Doe - +

@@ -132,7 +132,7 @@

John Doe - +

@@ -143,7 +143,7 @@

- +

@@ -383,15 +383,15 @@
W3C
- W3C + W3C
W3C
- World Wide Web Consortium
- + W3C @@ -448,7 +448,7 @@ my website! - Joe Public + Joe Public
@@ -496,7 +496,7 @@ C1a C2a - C4 + C4 @@ -534,11 +534,11 @@
Ryan King - My other hCard + My other hCard
Ryan King - my other hcard + my other hcard
Ryan King @@ -691,7 +691,7 @@ function test_hCard() { is(hcard.n["given-name"][0], "John", "07-relative-url - given-name"); is(hcard.n["family-name"][0], "Doe", "07-relative-url - family-name"); // is(hcard.url[0], "http://microformats.org/home/blah", "07-relative-url - url"); - is(hcard.url, "http://localhost:8888/home/blah", "07-relative-url - url"); + is(hcard.url, "http://mochi.test:8888/home/blah", "07-relative-url - url"); hcard = new hCard(document.getElementById("11-multiple-urls")); @@ -706,15 +706,15 @@ function test_hCard() { is(hcard.fn, "John Doe", "12-img-src-url - fn"); is(hcard.n["given-name"][0], "John", "12-img-src-url - given-name"); is(hcard.n["family-name"][0], "Doe", "12-img-src-url - family-name"); - is(hcard.url[0], "http://localhost:8888/tests/browser/microformats/test/picture.png", "12-img-src-url - url"); + is(hcard.url[0], "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "12-img-src-url - url"); hcard = new hCard(document.getElementById("13-photo-logo")); is(hcard.fn, "John Doe", "13-photo-logo - fn"); is(hcard.n["given-name"][0], "John", "13-photo-logo - given-name"); is(hcard.n["family-name"][0], "Doe", "13-photo-logo - family-name"); - is(hcard.logo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "13-photo-logo - logo"); - is(hcard.photo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "13-photo-logo - photo"); + is(hcard.logo, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "13-photo-logo - logo"); + is(hcard.photo, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "13-photo-logo - photo"); hcard = new hCard(document.getElementById("14-img-src-data-url")); @@ -757,9 +757,9 @@ function test_hCard() { is(hcard.fn, "John Doe", "18-object-data-http-uri - fn"); is(hcard.n["given-name"][0], "John", "18-object-data-http-uri - given-name"); is(hcard.n["family-name"][0], "Doe", "18-object-data-http-uri - family-name"); - is(hcard.logo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - logo"); - is(hcard.photo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - photo"); - is(hcard.url, "http://localhost:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - url"); + is(hcard.logo, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - logo"); + is(hcard.photo, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - photo"); + is(hcard.url, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "18-object-data-http-uri - url"); hcard = new hCard(document.getElementById("19-object-data-data-uri")); @@ -775,8 +775,8 @@ function test_hCard() { is(hcard.fn, "John Doe", "20-image-alt - fn"); is(hcard.n["given-name"][0], "John", "20-image-alt - given-name"); is(hcard.n["family-name"][0], "Doe", "20-image-alt - family-name"); - is(hcard.logo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "20-image-alt - logo"); - is(hcard.photo, "http://localhost:8888/tests/browser/microformats/test/picture.png", "20-image-alt - photo"); + is(hcard.logo, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "20-image-alt - logo"); + is(hcard.photo, "http://mochi.test:8888/tests/browser/microformats/test/picture.png", "20-image-alt - photo"); hcard = new hCard(document.getElementById("21-tel")); @@ -1148,16 +1148,16 @@ function test_hCard() { is(hcard.fn, "Ryan King", "38-uid.2 - fn"); is(hcard.n["given-name"][0], "Ryan", "38-uid.2 - given-name"); is(hcard.n["family-name"][0], "King", "38-uid.2 - family-name"); - is(hcard.uid, "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.2 - uid"); - is(hcard.url[0], "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.2 - url"); + is(hcard.uid, "http://mochi.test:8888/tests/browser/microformats/test/contact/", "38-uid.2 - uid"); + is(hcard.url[0], "http://mochi.test:8888/tests/browser/microformats/test/contact/", "38-uid.2 - url"); hcard = new hCard(document.getElementById("38-uid.3")); is(hcard.fn, "Ryan King", "38-uid.3 - fn"); is(hcard.n["given-name"][0], "Ryan", "38-uid.3 - given-name"); is(hcard.n["family-name"][0], "King", "38-uid.3 - family-name"); - is(hcard.uid, "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.3 - uid"); - is(hcard.url[0], "http://localhost:8888/tests/browser/microformats/test/contact/", "38-uid.3 - url"); + is(hcard.uid, "http://mochi.test:8888/tests/browser/microformats/test/contact/", "38-uid.3 - uid"); + is(hcard.url[0], "http://mochi.test:8888/tests/browser/microformats/test/contact/", "38-uid.3 - url"); hcard = new hCard(document.getElementById("38-uid.4")); diff --git a/toolkit/components/passwordmgr/test/pwmgr_common.js b/toolkit/components/passwordmgr/test/pwmgr_common.js index a2df1a3aef2..df843fba949 100644 --- a/toolkit/components/passwordmgr/test/pwmgr_common.js +++ b/toolkit/components/passwordmgr/test/pwmgr_common.js @@ -153,7 +153,7 @@ function commonInit() { // Add a login that's used in multiple tests var login = Components.classes["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Components.interfaces.nsILoginInfo); - login.init("http://localhost:8888", "http://localhost:8888", null, + login.init("http://mochi.test:8888", "http://mochi.test:8888", null, "testuser", "testpass", "uname", "pword"); pwmgr.addLogin(login); diff --git a/toolkit/components/passwordmgr/test/test_basic_form_autocomplete.html b/toolkit/components/passwordmgr/test/test_basic_form_autocomplete.html index 8f223604d33..400634aee2b 100644 --- a/toolkit/components/passwordmgr/test/test_basic_form_autocomplete.html +++ b/toolkit/components/passwordmgr/test/test_basic_form_autocomplete.html @@ -102,52 +102,52 @@ ok(nsLoginInfo != null, "nsLoginInfo constructor"); // login0 has no username, so should be filtered out from the autocomplete list. var login0 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete:8888", null, + "http://mochi.test:8888", "http://autocomplete:8888", null, "", "user0pass", "", "pword"); var login1 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete:8888", null, + "http://mochi.test:8888", "http://autocomplete:8888", null, "tempuser1", "temppass1", "uname", "pword"); var login2 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete:8888", null, + "http://mochi.test:8888", "http://autocomplete:8888", null, "testuser2", "testpass2", "uname", "pword"); var login3 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete:8888", null, + "http://mochi.test:8888", "http://autocomplete:8888", null, "testuser3", "testpass3", "uname", "pword"); var login4 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete:8888", null, + "http://mochi.test:8888", "http://autocomplete:8888", null, "zzzuser4", "zzzpass4", "uname", "pword"); // login 5 only used in the single-user forms var login5 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete2", null, + "http://mochi.test:8888", "http://autocomplete2", null, "singleuser5", "singlepass5", "uname", "pword"); var login6A = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete3", null, + "http://mochi.test:8888", "http://autocomplete3", null, "form7user1", "form7pass1", "uname", "pword"); var login6B = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete3", null, + "http://mochi.test:8888", "http://autocomplete3", null, "form7user2", "form7pass2", "uname", "pword"); var login7 = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete4", null, + "http://mochi.test:8888", "http://autocomplete4", null, "form8user", "form8pass", "uname", "pword"); var login8A = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete5", null, + "http://mochi.test:8888", "http://autocomplete5", null, "form9userAB", "form9pass", "uname", "pword"); var login8B = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete5", null, + "http://mochi.test:8888", "http://autocomplete5", null, "form9userAAB", "form9pass", "uname", "pword"); // login8C is added later var login8C = new nsLoginInfo( - "http://localhost:8888", "http://autocomplete5", null, + "http://mochi.test:8888", "http://autocomplete5", null, "form9userAABz", "form9pass", "uname", "pword"); // try/catch in case someone runs the tests manually, twice. try { @@ -396,7 +396,7 @@ function runTest(testNum) { // Delete the first entry (of 4), "tempuser1" doKey("down"); var numLogins; - numLogins = pwmgr.countLogins("http://localhost:8888", "http://autocomplete:8888", null); + numLogins = pwmgr.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null); is(numLogins, 5, "Correct number of logins before deleting one"); // On OS X, shift-backspace and shift-delete work, just delete does not. @@ -404,7 +404,7 @@ function runTest(testNum) { doKey("delete", shiftModifier); checkACForm("", ""); - numLogins = pwmgr.countLogins("http://localhost:8888", "http://autocomplete:8888", null); + numLogins = pwmgr.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null); is(numLogins, 4, "Correct number of logins after deleting one"); doKey("return"); checkACForm("testuser2", "testpass2"); @@ -431,7 +431,7 @@ function runTest(testNum) { doKey("down"); doKey("delete", shiftModifier); checkACForm("", ""); - numLogins = pwmgr.countLogins("http://localhost:8888", "http://autocomplete:8888", null); + numLogins = pwmgr.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null); is(numLogins, 3, "Correct number of logins after deleting one"); doKey("return"); checkACForm("zzzuser4", "zzzpass4"); @@ -458,7 +458,7 @@ function runTest(testNum) { doKey("down"); doKey("delete", shiftModifier); checkACForm("", ""); - numLogins = pwmgr.countLogins("http://localhost:8888", "http://autocomplete:8888", null); + numLogins = pwmgr.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null); is(numLogins, 2, "Correct number of logins after deleting one"); doKey("return"); checkACForm("testuser2", "testpass2"); @@ -485,7 +485,7 @@ function runTest(testNum) { doKey("delete", shiftModifier); //doKey("return"); checkACForm("", ""); - numLogins = pwmgr.countLogins("http://localhost:8888", "http://autocomplete:8888", null); + numLogins = pwmgr.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null); is(numLogins, 1, "Correct number of logins after deleting one"); pwmgr.removeLogin(login0); // remove the login that's not shown in the list. testNum = 99; diff --git a/toolkit/components/passwordmgr/test/test_basic_form_observer_foundLogins.html b/toolkit/components/passwordmgr/test/test_basic_form_observer_foundLogins.html index e16602b7f9f..244f1dfab4a 100644 --- a/toolkit/components/passwordmgr/test/test_basic_form_observer_foundLogins.html +++ b/toolkit/components/passwordmgr/test/test_basic_form_observer_foundLogins.html @@ -79,10 +79,10 @@ var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1", Components.interfaces.nsILoginInfo); var login1 = new nsLoginInfo(); -login1.init("http://localhost:8888", "http://www.example.com", null, +login1.init("http://mochi.test:8888", "http://www.example.com", null, "testuser1", "testpass1", "uname", "pword"); var login2 = new nsLoginInfo(); -login2.init("http://localhost:8888", "http://www.example.com", null, +login2.init("http://mochi.test:8888", "http://www.example.com", null, "testuser2", "testpass2", "uname", "pword"); var pwmgr = Cc["@mozilla.org/login-manager;1"]. getService(Ci.nsILoginManager); diff --git a/toolkit/components/passwordmgr/test/test_basic_form_pwonly.html b/toolkit/components/passwordmgr/test/test_basic_form_pwonly.html index e74559bbe6e..f4937f3e7f9 100644 --- a/toolkit/components/passwordmgr/test/test_basic_form_pwonly.html +++ b/toolkit/components/passwordmgr/test/test_basic_form_pwonly.html @@ -208,10 +208,10 @@ ok(nsLoginInfo != null, "nsLoginInfo constructor"); pwlogin1 = new nsLoginInfo(); pwlogin2 = new nsLoginInfo(); -pwlogin1.init("http://localhost:8888", "http://localhost:1111", null, +pwlogin1.init("http://mochi.test:8888", "http://localhost:1111", null, "", "1234", "uname", "pword"); -pwlogin2.init("http://localhost:8888", "http://localhost:8888", null, +pwlogin2.init("http://mochi.test:8888", "http://mochi.test:8888", null, "", "1234", "uname", "pword"); try { diff --git a/toolkit/components/passwordmgr/test/test_bug_360493_1.html b/toolkit/components/passwordmgr/test/test_bug_360493_1.html index 39e74a421e3..e409c690964 100644 --- a/toolkit/components/passwordmgr/test/test_bug_360493_1.html +++ b/toolkit/components/passwordmgr/test/test_bug_360493_1.html @@ -22,7 +22,7 @@ Login Manager test: 360493 -
+ @@ -31,7 +31,7 @@ Login Manager test: 360493
-
+ @@ -40,7 +40,7 @@ Login Manager test: 360493
-
+ diff --git a/toolkit/components/passwordmgr/test/test_bug_427033.html b/toolkit/components/passwordmgr/test/test_bug_427033.html index a546c316694..f914f24c0b5 100644 --- a/toolkit/components/passwordmgr/test/test_bug_427033.html +++ b/toolkit/components/passwordmgr/test/test_bug_427033.html @@ -55,7 +55,7 @@ var jslogin = Components.classes["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Components.interfaces.nsILoginInfo); ok(jslogin != null, "create a login"); -jslogin.init("http://localhost:8888", "javascript:", null, +jslogin.init("http://mochi.test:8888", "javascript:", null, "jsuser", "jspass123", "uname", "pword"); try { diff --git a/toolkit/components/passwordmgr/test/test_bug_444968.html b/toolkit/components/passwordmgr/test/test_bug_444968.html index e579c3991ea..112edee55e6 100644 --- a/toolkit/components/passwordmgr/test/test_bug_444968.html +++ b/toolkit/components/passwordmgr/test/test_bug_444968.html @@ -90,16 +90,16 @@ login2B = Cc["@mozilla.org/login-manager/loginInfo;1"]. login2C = Cc["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Ci.nsILoginInfo); -login1A.init("http://localhost:8888", "http://bug444968-1", null, +login1A.init("http://mochi.test:8888", "http://bug444968-1", null, "testuser1A", "testpass1A", "", ""); -login1B.init("http://localhost:8888", "http://bug444968-1", null, +login1B.init("http://mochi.test:8888", "http://bug444968-1", null, "", "testpass1B", "", ""); -login2A.init("http://localhost:8888", "http://bug444968-2", null, +login2A.init("http://mochi.test:8888", "http://bug444968-2", null, "testuser2A", "testpass2A", "", ""); -login2B.init("http://localhost:8888", "http://bug444968-2", null, +login2B.init("http://mochi.test:8888", "http://bug444968-2", null, "", "testpass2B", "", ""); -login2C.init("http://localhost:8888", "http://bug444968-2", null, +login2C.init("http://mochi.test:8888", "http://bug444968-2", null, "testuser2C", "testpass2C", "", ""); pwmgr.addLogin(login1A); diff --git a/toolkit/components/passwordmgr/test/test_notifications.html b/toolkit/components/passwordmgr/test/test_notifications.html index ee01381017e..3c2162661d8 100644 --- a/toolkit/components/passwordmgr/test/test_notifications.html +++ b/toolkit/components/passwordmgr/test/test_notifications.html @@ -112,7 +112,7 @@ function checkTest() { is(gotPass, "notifyp1", "Checking submitted password"); bar = getNotificationBar(notifyBox, "password-save"); ok(bar, "got notification bar"); - is(true, pwmgr.getLoginSavingEnabled("http://localhost:8888"), + is(true, pwmgr.getLoginSavingEnabled("http://mochi.test:8888"), "Checking for login saving enabled"); clickNotificationButton(bar, kNeverButton); break; @@ -123,10 +123,10 @@ function checkTest() { is(gotPass, "notifyp1", "Checking submitted password"); bar = getNotificationBar(notifyBox, "password-save"); ok(!bar, "checking for no notification bar"); - is(false, pwmgr.getLoginSavingEnabled("http://localhost:8888"), + is(false, pwmgr.getLoginSavingEnabled("http://mochi.test:8888"), "Checking for login saving disabled"); // reenable login saving. - pwmgr.setLoginSavingEnabled("http://localhost:8888", true); + pwmgr.setLoginSavingEnabled("http://mochi.test:8888", true); break; case 4: @@ -387,13 +387,13 @@ ok(prefs != null, "Access pref branch"); var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo, "init"); -var login1 = new nsLoginInfo("http://localhost:8888", "http://localhost:8888", null, +var login1 = new nsLoginInfo("http://mochi.test:8888", "http://mochi.test:8888", null, "notifyu1", "notifyp1", "user", "pass"); -var login2 = new nsLoginInfo("http://localhost:8888", "http://localhost:8888", null, +var login2 = new nsLoginInfo("http://mochi.test:8888", "http://mochi.test:8888", null, "", "notifyp1", "", "pass"); -var login1B = new nsLoginInfo("http://localhost:8888", "http://localhost:8888", null, +var login1B = new nsLoginInfo("http://mochi.test:8888", "http://mochi.test:8888", null, "notifyu1B", "notifyp1B", "user", "pass"); -var login2B = new nsLoginInfo("http://localhost:8888", "http://localhost:8888", null, +var login2B = new nsLoginInfo("http://mochi.test:8888", "http://mochi.test:8888", null, "", "notifyp1B", "", "pass"); var iframe = document.getElementById("iframe"); diff --git a/toolkit/components/passwordmgr/test/test_prompt.html b/toolkit/components/passwordmgr/test/test_prompt.html index 9358165aba1..e0ed3248285 100644 --- a/toolkit/components/passwordmgr/test/test_prompt.html +++ b/toolkit/components/passwordmgr/test/test_prompt.html @@ -63,11 +63,11 @@ function initLogins() { "100@beef", "user3pass", "", ""); login2E.init("http://example2.com", null, "http://example2.com", "100%beef", "user3pass", "", ""); - login3A.init("http://localhost:8888", null, "mochitest", + login3A.init("http://mochi.test:8888", null, "mochitest", "mochiuser1", "mochipass1", "", ""); - login3B.init("http://localhost:8888", null, "mochitest2", + login3B.init("http://mochi.test:8888", null, "mochitest2", "mochiuser2", "mochipass2", "", ""); - login4.init("http://localhost:8888", null, "mochitest3", + login4.init("http://mochi.test:8888", null, "mochitest3", "mochiuser3", "mochipass3-old", "", ""); pwmgr.addLogin(login1); @@ -380,7 +380,7 @@ function handleLoad() { clickNotificationButton(bar, kChangeButton); // Housekeeping: change it back - tmpLogin.init("http://localhost:8888", null, "mochitest", + tmpLogin.init("http://mochi.test:8888", null, "mochitest", "mochiuser1", "mochipass1-new", "", ""); pwmgr.modifyLogin(tmpLogin, login3A); @@ -404,7 +404,7 @@ function handleLoad() { // Housekeeping: change it back to the original login4. Actually, // just delete it and we'll re-add it as the next test. - tmpLogin.init("http://localhost:8888", null, "mochitest3", + tmpLogin.init("http://mochi.test:8888", null, "mochitest3", "mochiuser3", "mochipass3-new", "", ""); pwmgr.removeLogin(tmpLogin); // Clear cached auth from this subtest, and avoid leaking due to bug 459620. diff --git a/toolkit/components/passwordmgr/test/test_prompt_async.html b/toolkit/components/passwordmgr/test/test_prompt_async.html index 9867cf05a58..1f7f8c0a6b2 100644 --- a/toolkit/components/passwordmgr/test/test_prompt_async.html +++ b/toolkit/components/passwordmgr/test/test_prompt_async.html @@ -88,15 +88,23 @@ logins.push(login); } - addLogin("moz-proxy://127.0.0.1:8888", "proxy_realm", + //need to allow for arbitrary network servers, hardcoded for 8888, although PAC might h$ + var ios = Cc["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); + var pps = Cc["@mozilla.org/network/protocol-proxy-service;1"].getService(); + + var uri = ios.newURI("http://example.com", null, null); + var pi = pps.resolve(uri, 0); + var mozproxy = "moz-proxy://" + pi.host + ":" + pi.port; + + addLogin(mozproxy, "proxy_realm", "proxy_user", "proxy_pass"); - addLogin("moz-proxy://127.0.0.1:8888", "proxy_realm2", + addLogin(mozproxy, "proxy_realm2", "proxy_user2", "proxy_pass2"); - addLogin("moz-proxy://127.0.0.1:8888", "proxy_realm3", + addLogin(mozproxy, "proxy_realm3", "proxy_user3", "proxy_pass3"); - addLogin("moz-proxy://127.0.0.1:8888", "proxy_realm4", + addLogin(mozproxy, "proxy_realm4", "proxy_user4", "proxy_pass4"); - addLogin("moz-proxy://127.0.0.1:8888", "proxy_realm5", + addLogin(mozproxy, "proxy_realm5", "proxy_user5", "proxy_pass5"); addLogin("http://example.com", "mochirealm", "user1name", "user1pass"); @@ -266,7 +274,7 @@ case 6: // Reload the frame from the previous step and let the proxy // authentication pass but WWW fail. We expect two dialogs - // and an unathentiocated page content load. + // and an unathenticated page content load. ok(true, "doTest testNum 6"); expectedLoads = 1; expectedDialogs = 2; diff --git a/toolkit/components/passwordmgr/test/test_xhr.html b/toolkit/components/passwordmgr/test/test_xhr.html index 43785bce848..cde89f66463 100644 --- a/toolkit/components/passwordmgr/test/test_xhr.html +++ b/toolkit/components/passwordmgr/test/test_xhr.html @@ -33,9 +33,9 @@ function initLogins() { login2 = Cc["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Ci.nsILoginInfo); - login1.init("http://localhost:8888", null, "xhr", + login1.init("http://mochi.test:8888", null, "xhr", "xhruser1", "xhrpass1", "", ""); - login2.init("http://localhost:8888", null, "xhr2", + login2.init("http://mochi.test:8888", null, "xhr2", "xhruser2", "xhrpass2", "", ""); pwmgr.addLogin(login1); diff --git a/toolkit/components/passwordmgr/test/test_xml_load.html b/toolkit/components/passwordmgr/test/test_xml_load.html index fd7d59f5592..0ef903c1b5c 100644 --- a/toolkit/components/passwordmgr/test/test_xml_load.html +++ b/toolkit/components/passwordmgr/test/test_xml_load.html @@ -33,9 +33,9 @@ function initLogins() { login2 = Cc["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Ci.nsILoginInfo); - login1.init("http://localhost:8888", null, "xml", + login1.init("http://mochi.test:8888", null, "xml", "xmluser1", "xmlpass1", "", ""); - login2.init("http://localhost:8888", null, "xml2", + login2.init("http://mochi.test:8888", null, "xml2", "xmluser2", "xmlpass2", "", ""); pwmgr.addLogin(login1); diff --git a/toolkit/components/places/tests/chrome/test_329534.xul b/toolkit/components/places/tests/chrome/test_329534.xul index 1563a76c25e..438c67a124a 100644 --- a/toolkit/components/places/tests/chrome/test_329534.xul +++ b/toolkit/components/places/tests/chrome/test_329534.xul @@ -47,14 +47,14 @@ var secondURL = ""; lmsvc.stopUpdateLivemarks(); // add 2 feeds -const FEED1 = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/rss_as_html.rss"; +const FEED1 = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/rss_as_html.rss"; gLivemarkId1 = lmsvc.createLivemarkFolderOnly( toolbarFolderId, "foo", - uri("http:/localhost:8888/"), + uri("http:/mochi.test:8888/"), uri(FEED1), -1); -const FEED2 = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom"; +const FEED2 = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom"; gLivemarkId2 = lmsvc.createLivemarkFolderOnly( toolbarFolderId, "bar", - uri("http:/localhost:8888/"), + uri("http:/mochi.test:8888/"), uri(FEED2), -1); var observer = diff --git a/toolkit/components/places/tests/chrome/test_341972a.xul b/toolkit/components/places/tests/chrome/test_341972a.xul index b4f519635ea..f7565a2ce46 100644 --- a/toolkit/components/places/tests/chrome/test_341972a.xul +++ b/toolkit/components/places/tests/chrome/test_341972a.xul @@ -66,8 +66,8 @@ var observer = onPageAnnotationRemoved: function(aUri, aAnnotationName) {} }; -const FEEDSPEC = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom"; -const INITIALSITESPEC = "http://localhost:8888/"; +const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom"; +const INITIALSITESPEC = "http://mochi.test:8888/"; const FEEDSITESPEC = "http://example.org/"; gLivemarkId = lmsvc.createLivemarkFolderOnly(toolbarFolderId, "foo", diff --git a/toolkit/components/places/tests/chrome/test_342484.xul b/toolkit/components/places/tests/chrome/test_342484.xul index f339a13788b..81c019565bd 100644 --- a/toolkit/components/places/tests/chrome/test_342484.xul +++ b/toolkit/components/places/tests/chrome/test_342484.xul @@ -83,10 +83,10 @@ function runTest() { SimpleTest.finish(); } -const FEEDSPEC = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/bad_links.atom"; +const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/bad_links.atom"; gLivemarkId = lmsvc.createLivemarkFolderOnly(toolbarFolderId, "foo", - uri("http:/localhost/"), + uri("http:/mochi.test/"), uri(FEEDSPEC), -1); bmsvc.addObserver(observer, false); lmsvc.reloadLivemarkFolder(gLivemarkId); diff --git a/toolkit/components/places/tests/chrome/test_381357.xul b/toolkit/components/places/tests/chrome/test_381357.xul index c6027ea2a55..b06ec72a2d7 100644 --- a/toolkit/components/places/tests/chrome/test_381357.xul +++ b/toolkit/components/places/tests/chrome/test_381357.xul @@ -67,10 +67,10 @@ var observer = }; -const FEEDSPEC = "http://localhost:8888/tests/toolkit/components/places/tests/chrome/rss_as_html.rss"; +const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/rss_as_html.rss"; gLivemarkId = lmsvc.createLivemarkFolderOnly(toolbarFolderId, "foo", - uri("http:/localhost/"), + uri("http:/mochi.test/"), uri(FEEDSPEC), -1); bmsvc.addObserver(observer, false); lmsvc.reloadLivemarkFolder(gLivemarkId); diff --git a/toolkit/components/places/tests/mochitest/test_bug_461710.html b/toolkit/components/places/tests/mochitest/test_bug_461710.html index 9137f8b133d..39ca5294139 100644 --- a/toolkit/components/places/tests/mochitest/test_bug_461710.html +++ b/toolkit/components/places/tests/mochitest/test_bug_461710.html @@ -60,7 +60,7 @@ const kRed = "rgb(255, 0, 0)"; const kBlue = "rgb(0, 0, 255)"; var testpath = document.location.pathname + "/../bug_461710/"; -var prefix = "http://localhost:8888" + testpath; +var prefix = "http://mochi.test:8888" + testpath; var subtests = [ "visited_page.html", // 1 "link_page.html", // 2 diff --git a/toolkit/content/tests/browser/browser_bug471962.js b/toolkit/content/tests/browser/browser_bug471962.js index 7b5b7fe65c1..18d74a3b9bb 100644 --- a/toolkit/content/tests/browser/browser_bug471962.js +++ b/toolkit/content/tests/browser/browser_bug471962.js @@ -53,7 +53,7 @@ function test() { // --- Test implementation --- const kBaseUrl = - "http://localhost:8888/browser/toolkit/content/tests/browser/data/"; + "http://mochi.test:8888/browser/toolkit/content/tests/browser/data/"; function FramePostData_TestGenerator() { // Display the outer page, and wait for it to be loaded. Loading the URI diff --git a/toolkit/mozapps/downloads/tests/chrome/test_unkownContentType_dialog_layout.xul b/toolkit/mozapps/downloads/tests/chrome/test_unkownContentType_dialog_layout.xul index 7060575159e..83d88fda549 100644 --- a/toolkit/mozapps/downloads/tests/chrome/test_unkownContentType_dialog_layout.xul +++ b/toolkit/mozapps/downloads/tests/chrome/test_unkownContentType_dialog_layout.xul @@ -62,14 +62,14 @@ const UCT_URI = "chrome://mozapps/content/downloads/unknownContentType.xul"; let testIndex = -1; let tests = [ { // This URL will trigger the simple UI, where only the Save an Cancel buttons are available - url: "http://localhost:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif", + url: "http://mochi.test:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif", elements: { basicBox: { collapsed: false }, normalBox: { collapsed: true } } }, { // This URL will trigger the full UI - url: "http://localhost:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt", + url: "http://mochi.test:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt", elements: { basicBox: { collapsed: true }, normalBox: { collapsed: false } diff --git a/uriloader/exthandler/tests/mochitest/handlerApps.js b/uriloader/exthandler/tests/mochitest/handlerApps.js index 7d99fb453eb..cf591e5a1f3 100644 --- a/uriloader/exthandler/tests/mochitest/handlerApps.js +++ b/uriloader/exthandler/tests/mochitest/handlerApps.js @@ -48,7 +48,7 @@ function test() { createInstance(Components.interfaces.nsIWebHandlerApp); webHandler.name = "Test Web Handler App"; webHandler.uriTemplate = - "http://localhost:8888/tests/uriloader/exthandler/tests/mochitest/" + + "http://mochi.test:8888/tests/uriloader/exthandler/tests/mochitest/" + "handlerApp.xhtml?uri=%s"; // set up the uri to test with diff --git a/widget/tests/test_bug429954.xul b/widget/tests/test_bug429954.xul index 4fc9e4b1194..02f1bbce8b9 100644 --- a/widget/tests/test_bug429954.xul +++ b/widget/tests/test_bug429954.xul @@ -42,7 +42,6 @@ SimpleTest.waitForFocus(function () { "screenX=" + maxX + "screenY=" + maxY); }); - ]]>