Skip to content

Commit

Permalink
Bug 1417383 - Move mochitests from docshell/test/ to docshell/test/mo…
Browse files Browse the repository at this point in the history
…chitest/ to aid ESLint. r=qdot

Depends on D7052

Differential Revision: https://phabricator.services.mozilla.com/D7053
  • Loading branch information
Standard8 committed Oct 2, 2018
1 parent 5fc2d27 commit f4a6f9c
Show file tree
Hide file tree
Showing 109 changed files with 62 additions and 59 deletions.
2 changes: 1 addition & 1 deletion docshell/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ XPCSHELL_TESTS_MANIFESTS += [

MOCHITEST_MANIFESTS += [
'test/iframesandbox/mochitest.ini',
'test/mochitest.ini',
'test/mochitest/mochitest.ini',
'test/navigation/mochitest.ini',
]

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
return gFrame.contentDocument.getElementById("text").textContent;
}

var BASE_URI = "http://mochi.test:8888/tests/docshell/test/";
var BASE_URI = "http://mochi.test:8888/tests/docshell/test/mochitest/";
var START = BASE_URI + "start_historyframe.html";
var URL1 = BASE_URI + "url1_historyframe.html";
var URL2 = BASE_URI + "url2_historyframe.html";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<html>
<head>
<title>Test bug 529119</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />

<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");

var workingURL = "http://mochi.test:8888/tests/docshell/test/bug529119-window.html";
var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";

var w = null;
Expand All @@ -33,7 +33,7 @@
catch (ex) {
haveErrorPage = true;
}

if (iterationsLeft == 0 || haveErrorPage) {
window.clearInterval(int);
f(iterationsLeft > 0);
Expand All @@ -51,35 +51,35 @@
window.setTimeout(function() {
w.location.href = faultyURL;
}, 0);

phase = 1;

pollForPage(function(succeeded) {
ok(succeeded, "Waiting for error page succeeded");
/* 3. now, while we are on the error page, try to reload it, actually

/* 3. now, while we are on the error page, try to reload it, actually
click the "Try Again" button */
SpecialPowers.wrap(w).location.reload();

pollForPage(function(succeeded) {
ok(succeeded, "Waiting for error page succeeded");

/* 4-finish, check we are still on the error page */
is(SpecialPowers.wrap(w).location.href, faultyURL, "Is on an error page");
isnot(SpecialPowers.wrap(w).location.href, workingURL, "Is not on the previous page");
is(gotWrongPageOnTryAgainClick, false,
is(gotWrongPageOnTryAgainClick, false,
"Must not get www.example.com page on reload of an error page");
w.close();
SimpleTest.finish();
}, w);
}, w);
break;

case 1:
/* 4-check, we must not get here! */
gotWrongPageOnTryAgainClick = true;
break;
}
}
}

function startTest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<html>
<head>
<title>Test bug 529119</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />

<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");

var workingURL = "http://mochi.test:8888/tests/docshell/test/bug529119-window.html";
var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";

var w = null;
Expand All @@ -25,15 +25,15 @@
var iterationsLeft = 200;
var int = window.setInterval(function() {
iterationsLeft--;

var haveErrorPage = false;
try {
var title = w.document.title;
}
catch (ex) {
haveErrorPage = true;
}

if (iterationsLeft == 0 || expectErrorPage == haveErrorPage) {
window.clearInterval(int);
f(iterationsLeft > 0);
Expand All @@ -51,7 +51,7 @@
isWindowLoaded = true;

/* 2. We have successfully loaded a page, now go to a faulty URL */
// XXX The test fails when we change the location synchronously
// XXX The test fails when we change the location synchronously
window.setTimeout(function() {
w.location.href = faultyURL;
}, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<p>

<iframe id="testFrame" src="http://mochi.test:8888/tests/docshell/test/bug530396-subframe.html"></iframe>
<iframe id="testFrame" src="http://mochi.test:8888/tests/docshell/test/mochitest/bug530396-subframe.html"></iframe>

<pre id="test">
<script class="testbody" type="text/javascript">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
// Child needs to invoke us, otherwise our onload will fire before the child
// has done the write/close bit.
onmessage = function doTest() {
is(frames[0].location.pathname, "/tests/docshell/test/file_pushState_after_document_open.html", "Should have the right path here");
is(frames[0].location.pathname, "/tests/docshell/test/mochitest/file_pushState_after_document_open.html",
"Should have the right path here");
is(frames[0].location.hash, "", "Should have the right hash here");
frames[0].history.pushState({}, '', frames[0].document.URL + "#foopy");
is(frames[0].location.pathname, "/tests/docshell/test/file_pushState_after_document_open.html", "Pathname should not have changed");
is(frames[0].location.pathname, "/tests/docshell/test/mochitest/file_pushState_after_document_open.html",
"Pathname should not have changed");
is(frames[0].location.hash, "#foopy", "Hash should have changed");
SimpleTest.finish();
}
Expand Down
File renamed without changes.
File renamed without changes.
79 changes: 40 additions & 39 deletions docshell/test/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,46 @@ with Files('iframesandbox/*marquee_event_handlers*'):
BUG_COMPONENT = ('Core', 'DOM: Security')


with Files('mochitest/*1045096*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('mochitest/*1151421*'):
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')

with Files('mochitest/*402210*'):
BUG_COMPONENT = ('Core', 'DOM: Security')

with Files('mochitest/*509055*'):
BUG_COMPONENT = ('Core', 'History: Global')

with Files('mochitest/*511449*'):
BUG_COMPONENT = ('Core', 'Widget: Cocoa')

with Files('mochitest/*551225*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('mochitest/*570341*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('mochitest/*580069*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('mochitest/*637644*'):
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')

with Files('mochitest/*640387*'):
BUG_COMPONENT = ('Core', 'DOM: Events')

with Files('mochitest/*668513*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('mochitest/*797909*'):
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')

with Files('mochitest/*forceinheritprincipal*'):
BUG_COMPONENT = ('Core', 'DOM: Security')


with Files('navigation/*13871.html'):
BUG_COMPONENT = ('Core', 'Security')

Expand Down Expand Up @@ -99,42 +139,3 @@ with Files('unit/*442584*'):

with Files('unit/*setUsePrivateBrowsing*'):
BUG_COMPONENT = ('Firefox', 'Extension Compatibility')

with Files('*1045096*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('*1151421*'):
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')

with Files('*402210*'):
BUG_COMPONENT = ('Core', 'DOM: Security')

with Files('*509055*'):
BUG_COMPONENT = ('Core', 'History: Global')

with Files('*511449*'):
BUG_COMPONENT = ('Core', 'Widget: Cocoa')

with Files('*551225*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('*570341*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('*580069*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('*637644*'):
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')

with Files('*640387*'):
BUG_COMPONENT = ('Core', 'DOM: Events')

with Files('*668513*'):
BUG_COMPONENT = ('Core', 'DOM')

with Files('*797909*'):
BUG_COMPONENT = ('Core', 'DOM: Core & HTML')

with Files('*forceinheritprincipal*'):
BUG_COMPONENT = ('Core', 'DOM: Security')

0 comments on commit f4a6f9c

Please sign in to comment.