Skip to content

Commit

Permalink
Bug 1366209 - rewrite dom/base/test/test_bug331959.html. r=smaug
Browse files Browse the repository at this point in the history
  • Loading branch information
allstarschh committed Aug 7, 2017
1 parent 9990fe5 commit b3c6e34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions dom/base/test/FAIL.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FAIL
1 change: 1 addition & 0 deletions dom/base/test/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ support-files =
file3_setting_opener.html
file4_setting_opener.html
PASS.html
FAIL.html
window_bug1384658.html

[test_anchor_area_referrer.html]
Expand Down
10 changes: 5 additions & 5 deletions dom/base/test/test_bug331959.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
/** Test for Bug 331959 **/
SimpleTest.waitForExplicitFinish();

const FAILURL = "data:text/plain,FAIL";
const PASSURL = "data:text/plain,PASS";
const FAILURL = "FAIL.html";
const PASSURL = "PASS.html";

var currentTest = 0;
var tests = [ testLinkInLinkMouse, testLinkInLinkKeyboard,
Expand All @@ -55,7 +55,7 @@
outerA.appendChild(innerA);
doc.body.appendChild(outerA);
$(id).onload = function() {
is(this.contentDocument.documentElement.textContent, "PASS", desc);
is(this.contentDocument.documentElement.innerText, "PASS", desc);
// Have to remove the iframe we used from the DOM, because the harness is
// stupid and doesn't have enough space for more than one iframe.
$(id).remove();
Expand Down Expand Up @@ -85,7 +85,7 @@
"<form action='" + PASSURL + "'><a href='" + FAILURL +
"'><input type='submit' id='submit'>";
$(id).onload = function() {
is(this.contentDocument.documentElement.textContent, "PASS?", desc);
is(this.contentDocument.documentElement.innerText, "PASS", desc);
// Have to remove the iframe we used from the DOM, because the harness is
// stupid and doesn't have enough space for more than one iframe.
$(id).remove();
Expand Down Expand Up @@ -117,7 +117,7 @@
"<form action='" + PASSURL + "'><a href='" + FAILURL +
"'><button type='submit' id='submit'>Submit</button>";
$(id).onload = function() {
is(this.contentDocument.documentElement.textContent, "PASS?", desc);
is(this.contentDocument.documentElement.innerText, "PASS", desc);
// Have to remove the iframe we used from the DOM, because the harness is
// stupid and doesn't have enough space for more than one iframe.
$(id).remove();
Expand Down

0 comments on commit b3c6e34

Please sign in to comment.