Bug 1366209 - rewrite dom/base/test/test_bug331959.html. r=smaug

This commit is contained in:
Yoshi Huang 2017-05-19 18:31:38 +08:00
Родитель 9be589ac3c
Коммит d970f62650
3 изменённых файлов: 7 добавлений и 5 удалений

1
dom/base/test/FAIL.html Normal file
Просмотреть файл

@ -0,0 +1 @@
FAIL

Просмотреть файл

@ -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]

Просмотреть файл

@ -28,8 +28,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=331959
/** 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,
@ -55,7 +55,7 @@ function generateLinkInLink(id, desc) {
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();
@ -85,7 +85,7 @@ function generateInputInLink(id, desc) {
"<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();
@ -117,7 +117,7 @@ function generateButtonInLink(id, desc) {
"<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();