import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<!doctype html>
001-1
<script>
if (window.opener !== null) {
window.opener.postMessage("FAIL", "*");
}
window.close();
</script>

View file

@ -0,0 +1,22 @@
<!doctype html>
<title>Link with target=_blank, rel=noreferrer</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<a href="001-1.html" rel="noreferrer" target="_blank">Link</a>
<script>
var t = async_test();
var a;
t.step(function() {
a = document.getElementsByTagName("a")[0];
a.click();
//This is a bit hacky; if the test passes there isn't a link back to the parent
//window so we have to pass on a timeout. But opening the link could be slow in
//some cases, so there is some possibility of false passes
setTimeout(t.step_func(function() {
t.done();
}), 1000);
});
onmessage = t.step_func(function() {assert_unreached("Opened window had a reference to opener")});
</script>

View file

@ -0,0 +1,8 @@
<!doctype html>
002-1
<script>
if (window.opener !== null) {
window.opener.postMessage("PASS", "*");
}
window.close();
</script>

View file

@ -0,0 +1,25 @@
<!doctype html>
<title>Link with target=_blank, no rel</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<a href="002-1.html" target="_blank">Link</a>
<script>
var a;
async_test(function(t) {
a = document.getElementsByTagName("a")[0];
a.click();
// This is a bit hacky; if the test fails there isn't a link back to the parent
// window so we have to pass on a timeout. But opening the link could be slow in
// some cases, so there is some possibility of false fails
step_timeout(t.step_func(function() {
assert_unreached("Failed to get callback from opened window");
}), 5000);
onmessage = t.step_func(function(e) {
assert_equals(e.data, "PASS");
t.done()
});
});
</script>

View file

@ -0,0 +1,4 @@
001.html
support 001-1.html
002.html
support 002-1.html

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is same as an existing browsing context's name</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="existing.html" style="display:none"></iframe>
<iframe name="existWin" style="display:none"></iframe>
<script>
var t = async_test("The browsing context must be chosen if the given name is same as its name");
window.addEventListener("message", function (e) {
t.step(function() {
assert_equals(e.data.name, "existWin", "The browsing context name should be 'existWin'.");
});
t.done();
}, false);
frames[0].onload = t.step_func(function(e) {
frames[0].do_test();
});
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is '_parent'</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="parent1.html" name="parentWin" style="display:none"></iframe>
<script>
var t = async_test("The parent browsing context must be chosen if the given name is '_parent'");
window.addEventListener("message", function (e) {
t.step(function() {
assert_equals(e.data.name, "parentWin", "The browsing context name should be 'parentWin'.");
});
t.done();
}, false);
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is '_self'</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="self1.html" style="display:none"></iframe>
<script>
var t = async_test("The current browsing context must be chosen if the given name is '_self'");
window.addEventListener("message", function (e) {
t.step(function () {
assert_equals(e.data.name, "selfWin1", "The browsing context name should be 'selfWin1'.");
});
t.done();
}, false);
</script>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - the given name is empty string</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="self2.html" style="display:none"></iframe>
<script>
var t = async_test("The current browsing context must be chosen if the given name is empty string");
window.addEventListener("message", function (e) {
t.step(function () {
assert_equals(e.data.name, "selfWin2", "The browsing context name should be 'selfWin2'.");
});
t.done();
}, false);
</script>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Browsing context - Default name</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe src="message.html" style="display:none"></iframe>
<script>
test(function () {
assert_equals(window.frames[0].name, "", "The browsing context should not have a default name.");
}, "A embedded browsing context has no default name");
test(function () {
var win = window.open("about:blank", "_blank");
assert_equals(win.name, "", "The browsing context should not have a name.");
win.close();
}, "A browsing context which is opened by window.open() method with '_blank' parameter has no default name");
//This test must be run when the current browsing context's name is not set
test(function () {
assert_equals(window.name, "", "The browsing context should not have a name.");
}, "A browsing context has no default name");
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>This is a test page</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
function do_test() {
window.open("message.html", "existWin");
}
</script>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: post window's name to top browsing context</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
top.postMessage({name: window.name}, "*");
</script>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - parent</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<iframe src="parent2.html"></iframe>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - parent</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
window.open("message.html", "_parent");
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - self</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
window.name = "selfWin1";
var win = window.open("message.html", "_self");
win.close();
</script>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: browsing context name - self</title>
<link rel="author" title="Intel" href="http://www.intel.com/">
<script>
window.name = "selfWin2";
var win = window.open("message.html", "");
win.close();
</script>