mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
remove mozbrowser tests
This commit is contained in:
parent
da349ee8a9
commit
d09bb477f9
43 changed files with 0 additions and 1223 deletions
|
@ -2387,18 +2387,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/iframe/mozbrowser_navigation.html": [
|
||||
[
|
||||
"/_mozilla/css/iframe/mozbrowser_navigation.html",
|
||||
[
|
||||
[
|
||||
"/_mozilla/css/iframe/mozbrowser_navigation_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/iframe/multiple_external.html": [
|
||||
[
|
||||
"/_mozilla/css/iframe/multiple_external.html",
|
||||
|
@ -8947,11 +8935,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/iframe/mozbrowser_navigation_ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/iframe/multiple_external_child.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -11102,101 +11085,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/helper.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_contentDocument_inner.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_privateContent_grandchild.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_privateContent_inner.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow_iframe1.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow_iframe2.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow_iframe3.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_child.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_grandchild.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_harness.js": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsericonchange_event_test.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowserlocationchange_event_iframe.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event_iframe.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event_nested_iframe.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event_no_params_alert.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsertitlechangedeagerly_event_iframe.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/redirect_final.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/redirect_init.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/stash.py": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/nested_asap_script.js": [
|
||||
[
|
||||
{}
|
||||
|
@ -33471,96 +33359,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/crossorigin_xhr.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/crossorigin_xhr.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_goback.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/iframe_goback.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_reload_twice.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/iframe_reload_twice.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_visibility.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/iframe_visibility.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowser_click_fires_openwindow.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_parentage.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowser_iframe_parentage.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_loadevents.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowser_loadevents.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsericonchange_event.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowsericonchange_event.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowserlocationchange_event.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowserlocationchange_event.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsersecuritychange_event.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowsersecuritychange_event.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsertitlechangedeagerly_event.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/mozbrowsertitlechangedeagerly_event.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/private_browsing.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/private_browsing.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/redirect.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/redirect.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mozbrowser/reload.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mozbrowser/reload.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/mql_borrow.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/mql_borrow.html",
|
||||
|
@ -62602,14 +62400,6 @@
|
|||
"e30451b16fc0c4b025a2160e6c7b849901150718",
|
||||
"support"
|
||||
],
|
||||
"css/iframe/mozbrowser_navigation.html": [
|
||||
"7a17922ce48c8138284ad1a1f0f88317df35b541",
|
||||
"reftest"
|
||||
],
|
||||
"css/iframe/mozbrowser_navigation_ref.html": [
|
||||
"368a46cfb7c6cdce26381121d803427d6ad93c69",
|
||||
"support"
|
||||
],
|
||||
"css/iframe/multiple_external.html": [
|
||||
"79df63cbb113c57ccacf5734a6d14e29d73478a5",
|
||||
"reftest"
|
||||
|
@ -66562,142 +66352,6 @@
|
|||
"1311e72e0a0dafa6fae594ca1ce2deca164acd36",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/crossorigin_xhr.html": [
|
||||
"e716ee75552f0e531fef1a71b20799ccb8b221d9",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/helper.html": [
|
||||
"652e88e7a84b50ca1d4ed3cc2d1f1e354fb9ab32",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_contentDocument_inner.html": [
|
||||
"a098b74e081838bcbf4ceb854a48a57eb5ae3cab",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_goback.html": [
|
||||
"a850e2549dfdbcfbb344ccc23ff03717d392bfdc",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_privateContent_grandchild.html": [
|
||||
"13d4e88f2581ff7d5cbbf149463563d0754978fe",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_privateContent_inner.html": [
|
||||
"354b3b6d6596559bac45119db6549f1347b93bef",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_reload_twice.html": [
|
||||
"c6e6cc7ca336154723c658fb8cae8989ca8b7ee7",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/iframe_visibility.html": [
|
||||
"c2a2df3f85f7ed1d76fbc694fe247071050ebb81",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow.html": [
|
||||
"30fa150f6f22a989bf7e85d3b367ec7d61f57f09",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow_iframe1.html": [
|
||||
"375566a899295a1da1685cd85127c2da60e1eee8",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow_iframe2.html": [
|
||||
"e4d4a2acd91a4f12323b5aca458a5c4068e70782",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_click_fires_openwindow_iframe3.html": [
|
||||
"9d714203485baed8faff37c312190dd384769c83",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_child.html": [
|
||||
"a51e76f9c72896a539b08d40f48fef0412336a34",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_grandchild.html": [
|
||||
"441c2e80ad3ecc9da321507a3c41b3c346bea0f0",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_harness.js": [
|
||||
"c5db7a8f3c32f79a4e24d176cb95563a999240e5",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_iframe_parentage.html": [
|
||||
"3f03a10f8f8c72cbd0a73fc130f705246c308871",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowser_loadevents.html": [
|
||||
"03ef403ece408147f23f5dc898a0509102c4d75c",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsericonchange_event.html": [
|
||||
"fbaeb75787aa039e506c32ec0487dc05dc6280cf",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsericonchange_event_test.html": [
|
||||
"61e39bc9ead6d4bfc9bf60bed3323753dc0e791a",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowserlocationchange_event.html": [
|
||||
"35a0671b553ae5787b8444deac127e2ee071d0f7",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowserlocationchange_event_iframe.html": [
|
||||
"ed175a1b2426de141ccb47e4d13c88ff0db0506e",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsersecuritychange_event.html": [
|
||||
"58a58e552f21dd650020197b7e28c87c4d84e691",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event.html": [
|
||||
"ff8971b64dda52903009697dc56df6b3a9cecdb3",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event_iframe.html": [
|
||||
"1cd97f725237d9ccba830a2e7f61b85da82319c5",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event_nested_iframe.html": [
|
||||
"4b40aeb217cfe9d557dbd4b87120b788ba7a0fd8",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsershowmodalprompt_event_no_params_alert.html": [
|
||||
"8c67b9c24de045fe36be9ff74a0700d7e7af6588",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsertitlechangedeagerly_event.html": [
|
||||
"2beae7d4e20e0b535144ac91113a73724f970321",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/mozbrowsertitlechangedeagerly_event_iframe.html": [
|
||||
"d7a0b1eced93ae16b2ccc7d1d1f2b1d383ff75ed",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/private_browsing.html": [
|
||||
"bc8f9bfde5b6eb53ec1362b0cfae5d300af15c7e",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/redirect.html": [
|
||||
"7377e38b6bdaea746d8e3c2801112200dca502d2",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/redirect_final.html": [
|
||||
"db82c9a14bc76e3548200bc2e507d6044660514c",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/redirect_init.html": [
|
||||
"ab668d7af80b7560bf3afa732b1198e2825929e9",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mozbrowser/reload.html": [
|
||||
"f8c4f6b0ccf95426a3e6816fce5490ef9704e267",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/mozbrowser/stash.py": [
|
||||
"5513229f79ab37de67eb4d60ea9dd23cd31d133f",
|
||||
"support"
|
||||
],
|
||||
"mozilla/mql_borrow.html": [
|
||||
"f8f9adebe09f9473a52e5ec4f075540b10b32d7e",
|
||||
"testharness"
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[mozbrowser_navigation.html]
|
||||
type: reftest
|
||||
prefs: [dom.mozbrowser.enabled:true]
|
||||
disabled: https://github.com/servo/servo/issues/10924
|
|
@ -1 +0,0 @@
|
|||
prefs: ["dom.mozbrowser.enabled:true"]
|
|
@ -1,3 +0,0 @@
|
|||
[iframe_visibility.html]
|
||||
type: testharness
|
||||
disabled: https://github.com/servo/servo/issues/11825
|
|
@ -1,5 +0,0 @@
|
|||
[mozbrowser_loadevents.html]
|
||||
type: testharness
|
||||
[mozbrowserloadstart, mozbrowserconnected and mozbrowserloadend are dispatched]
|
||||
expected: FAIL
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[mozbrowserlocationchange_event.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Browser API; mozbrowserlocationchange event]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[mozbrowsersecuritychange_event.html]
|
||||
type: testharness
|
||||
[mozbrowsersecuritychange event is dispatched when content security state changes]
|
||||
expected: FAIL
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
iframe {
|
||||
display: block;
|
||||
border: 1px solid black;
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
margin-left: 10px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
</style>
|
||||
<link rel="match" href="mozbrowser_navigation_ref.html">
|
||||
</head>
|
||||
<body>
|
||||
<iframe mozbrowser="true" src="data:text/html,Hello%20world"></iframe>
|
||||
<script>
|
||||
var iframe = document.getElementsByTagName('iframe')[0];
|
||||
iframe.addEventListener('load', function first() {
|
||||
iframe.removeEventListener('load', first);
|
||||
iframe.src = "data:text/html,Foo";
|
||||
iframe.addEventListener('load', function() {
|
||||
iframe.goBack();
|
||||
iframe.offsetHeight; // flush layout
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
}, false);
|
||||
}, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
iframe {
|
||||
display: block;
|
||||
border: 1px solid black;
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
margin-left: 10px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<iframe src="data:text/html,Hello%20world"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<head>
|
||||
<title>cross origin xhr() with mozbrowser</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "http://www2.web-platform.test:8000");
|
||||
xhr.send();
|
||||
|
||||
xhr.onerror = this.unreached_func("Cross origin xhr() should not have failed");
|
||||
|
||||
xhr.onload = this.step_func_done(() => {
|
||||
assert_equals(xhr.status, 200, "Cross origin xhr() is successful");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,6 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<p>test</p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +0,0 @@
|
|||
<html><body><div id="test">Normal iFrame</div></body>
|
||||
<script>alert(document.cookie)</script>
|
||||
</html>
|
|
@ -1,37 +0,0 @@
|
|||
<head>
|
||||
<title>iframe.goBack()</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
var url2 = "data:,a";
|
||||
var url1 = `data:text/html,<script>setTimeout(() => location.assign("${url2}"), 0)</${"script"}>`;
|
||||
|
||||
var locations = []
|
||||
var expected_locations = ["about:blank", url1, url2, url1];
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = url1;
|
||||
|
||||
iframe.addEventListener("mozbrowserlocationchange", t.step_func(e => {
|
||||
locations.push(e.detail.url);
|
||||
if (e.detail.url == url2) {
|
||||
iframe.goBack();
|
||||
}
|
||||
if (locations.length == expected_locations.length) {
|
||||
assert_array_equals(locations, expected_locations);
|
||||
t.done();
|
||||
}
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,4 +0,0 @@
|
|||
<span id="cookie"></span>
|
||||
<script>
|
||||
document.querySelector('#cookie').innerHTML = document.cookie;
|
||||
</script>
|
|
@ -1,13 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<div id="test">Private iFrame</div>
|
||||
</body>
|
||||
<script>document.cookie = "private=active;path=/";</script>
|
||||
<iframe src="iframe_privateContent_grandchild.html"></iframe>
|
||||
<script>
|
||||
var iframe = document.querySelector('iframe');
|
||||
iframe.onload = function() {
|
||||
alert(document.cookie + ' ' + iframe.contentDocument.querySelector('#cookie').textContent);
|
||||
};
|
||||
</script>
|
||||
</html>
|
|
@ -1,23 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Reloading an iframe twice doesn't panic</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var iframe = document.querySelector('iframe');
|
||||
var loaded = false;
|
||||
iframe.onload = t.step_func(function() {
|
||||
if (!loaded) {
|
||||
loaded = true;
|
||||
iframe.reload();
|
||||
iframe.reload();
|
||||
} else {
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
iframe.mozbrowser = true;
|
||||
iframe.src = "about:blank";
|
||||
});
|
||||
</script>
|
|
@ -1,115 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<head>
|
||||
<title>Iframe visibility tests</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var expectedVisibilities = [false, true];
|
||||
var receivedVisibilities = [];
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
iframe.src = "helper.html";
|
||||
|
||||
//Alternate the iframe's visibility and fire mozbrowservisibilitychange
|
||||
iframe.onload = t.step_func(function() {
|
||||
iframe.setVisible(false);
|
||||
iframe.setVisible(true);
|
||||
});
|
||||
|
||||
iframe.addEventListener("mozbrowservisibilitychange", t.step_func(e => {
|
||||
assert_equals(iframe.getVisible(), e.detail.visible);
|
||||
receivedVisibilities.push(e.detail.visible);
|
||||
if (receivedVisibilities.length == expectedVisibilities.length) {
|
||||
assert_array_equals(receivedVisibilities, expectedVisibilities);
|
||||
t.done();
|
||||
}
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
}, "Iframe visibility setter/getter");
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = true;
|
||||
iframe.src = "helper.html";
|
||||
var start = null;
|
||||
document.body.appendChild(iframe);
|
||||
iframe.onload = t.step_func(function() {
|
||||
var element = iframe.contentWindow.document.querySelector("p");
|
||||
var animationCompletesAfterResumingVisibility = false;
|
||||
var nonVisibleAnimationStopped = false;
|
||||
element.style.position = 'relative';
|
||||
element.style.right = "0px";
|
||||
var step = t.step_func(function(timestamp) {
|
||||
if (!start) start = timestamp;
|
||||
var progress = timestamp - start;
|
||||
element.style.right = Math.min(progress/5, 100) + "px";
|
||||
if (progress < 500) {
|
||||
iframe.contentWindow.requestAnimationFrame(step);
|
||||
}
|
||||
});
|
||||
|
||||
iframe.setVisible(false);
|
||||
|
||||
iframe.contentWindow.setTimeout(t.step_func(function(){
|
||||
nonVisibleAnimationStopped = element.style.right === '0px';
|
||||
iframe.setVisible(true);
|
||||
}),1000);
|
||||
|
||||
iframe.contentWindow.setTimeout(t.step_func(function(){
|
||||
animationCompletesAfterResumingVisibility = element.style.right === '100px';
|
||||
assert_true(nonVisibleAnimationStopped);
|
||||
assert_true(animationCompletesAfterResumingVisibility);
|
||||
t.done();
|
||||
}),2000);
|
||||
|
||||
iframe.contentWindow.requestAnimationFrame(step);
|
||||
});
|
||||
}, 'Requesting animation frame composites only when frame is visible');
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.src = "http://web-platform.test:8000/common/blank.html";
|
||||
iframe.mozbrowser = true;
|
||||
iframe.onload = t.step_func(function() {
|
||||
iframe.addEventListener("mozbrowservisibilitychange", t.step_func(function() {
|
||||
var startTime = Date.now();
|
||||
iframe.contentWindow.setTimeout(t.step_func(function() {
|
||||
assert_true(Date.now() - startTime >= 1000);
|
||||
t.done();
|
||||
}), 1);
|
||||
}));
|
||||
iframe.setVisible(false);
|
||||
});
|
||||
document.body.appendChild(iframe);
|
||||
}, 'Minimum setTimeout of 1s when pipeline is invisible');
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
var destination = "helper.html";
|
||||
iframe.src = "http://web-platform.test:8000/common/blank.html";
|
||||
iframe.mozbrowser = true;
|
||||
iframe.onload = t.step_func(function() {
|
||||
iframe.addEventListener("mozbrowservisibilitychange", t.step_func(function() {
|
||||
iframe.src = destination;
|
||||
}));
|
||||
if (iframe.src !== destination) {
|
||||
iframe.setVisible(false);
|
||||
} else {
|
||||
var startTime = Date.now();
|
||||
iframe.contentWindow.setTimeout(t.step_func(function() {
|
||||
assert_true(Date.now() - startTime >= 1000);
|
||||
t.done();
|
||||
}), 1);
|
||||
}
|
||||
});
|
||||
document.body.appendChild(iframe);
|
||||
}, 'Minimum setTimeout of 1s persists after new page is loaded');
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,27 +0,0 @@
|
|||
<head>
|
||||
<title>Browser API; mozbrowseropenwindow event</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowser_click_fires_openwindow_iframe1.html";
|
||||
|
||||
iframe.addEventListener("mozbrowseropenwindow", t.step_func(function(e) {
|
||||
var expectedURL = new URL("mozbrowser_click_fires_openwindow_iframe3.html", window.location.href);
|
||||
assert_equals(e.detail.target, "_blank");
|
||||
assert_equals(e.detail.url.toString(), expectedURL.toString());
|
||||
t.done();
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,8 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
Frame 1: <a id="anchor" href="mozbrowser_click_fires_openwindow_iframe2.html">go</a>.
|
||||
</body>
|
||||
<script>
|
||||
document.getElementById("anchor").click()
|
||||
</script>
|
||||
</html>
|
|
@ -1,8 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
Frame 2: <a id="anchor" href="mozbrowser_click_fires_openwindow_iframe3.html" target="_blank">go</a>.
|
||||
</body>
|
||||
<script>
|
||||
document.getElementById("anchor").click()
|
||||
</script>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
Frame 3.
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +0,0 @@
|
|||
<script src="mozbrowser_iframe_harness.js"></script>
|
||||
<body>
|
||||
<iframe src="mozbrowser_iframe_grandchild.html"></iframe>
|
||||
</body>
|
||||
<script>
|
||||
send_test_results({
|
||||
"id": 'aaee4290-6a78-4932-a1d1-fbbe158fb473',
|
||||
"parent": window.parent === window,
|
||||
"top": window.top === window,
|
||||
});
|
||||
</script>
|
|
@ -1,11 +0,0 @@
|
|||
<script src="mozbrowser_iframe_harness.js"></script>
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
||||
send_test_results({
|
||||
"id": 'a94c0025-08dc-49a6-8f98-fbbaacfdd296',
|
||||
"parent": window.parent !== window,
|
||||
"grandparent": window.parent.parent === window.parent,
|
||||
"top": window.top === window.parent,
|
||||
});
|
||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||
function get_test_results(id) {
|
||||
async_test(function(test) {
|
||||
var timer = window.setInterval(test.step_func(loop), 100);
|
||||
function loop() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'stash.py?id=' + id);
|
||||
xhr.onreadystatechange = test.step_func(function() {
|
||||
assert_equals(xhr.status, 200);
|
||||
if (xhr.responseText) {
|
||||
assert_equals(xhr.responseText, "OK");
|
||||
test.done();
|
||||
window.clearTimeout(timer);
|
||||
}
|
||||
});
|
||||
xhr.send();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function send_test_results(results) {
|
||||
var ok = true;
|
||||
for (result in results) { ok = ok && results[result]; }
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', 'stash.py?id=' + results.id);
|
||||
xhr.send(ok ? "OK" : "FAIL: " + JSON.stringify(results));
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Check the frame heriarchy</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="mozbrowser_iframe_harness.js"></script>
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowser_iframe_child.html";
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
get_test_results('cdea5bf0-667e-407c-878c-6b5cfa623fd6');
|
||||
get_test_results('aaee4290-6a78-4932-a1d1-fbbe158fb473');
|
||||
get_test_results('a94c0025-08dc-49a6-8f98-fbbaacfdd296');
|
||||
send_test_results({
|
||||
"id": 'cdea5bf0-667e-407c-878c-6b5cfa623fd6',
|
||||
"parent": window.parent === window,
|
||||
"top": window.top === window,
|
||||
});
|
||||
</script>
|
|
@ -1,47 +0,0 @@
|
|||
<head>
|
||||
<title>mozbrowserloadstart, mozbrowserconnected and mozbrowserloadend are dispatched</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
var has_reloaded = false;
|
||||
var expectedEvents = [
|
||||
"mozbrowserloadstart",
|
||||
"mozbrowserconnected",
|
||||
"mozbrowserloadend",
|
||||
"mozbrowserloadstart",
|
||||
"mozbrowserconnected",
|
||||
"mozbrowserloadend",
|
||||
];
|
||||
|
||||
var receivedEvents = [];
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "http://web-platform.test:8000";
|
||||
|
||||
for (var event_name of ["mozbrowserloadstart",
|
||||
"mozbrowserconnected",
|
||||
"mozbrowserloadend"]) {
|
||||
iframe.addEventListener(event_name, t.step_func(e => {
|
||||
receivedEvents.push(e.type);
|
||||
if (receivedEvents.length == expectedEvents.length) {
|
||||
assert_array_equals(receivedEvents, expectedEvents);
|
||||
t.done();
|
||||
} else {
|
||||
if (e.type == "mozbrowserloadend") {
|
||||
iframe.reload();
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,51 +0,0 @@
|
|||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
var expectedEvents = [
|
||||
{rel: "icon", href: "http://web-platform.test:8000/test1.ico", sizes: "any"},
|
||||
{rel: "icon", href: "http://web-platform.test:8000/_mozilla/mozilla/mozbrowser/test2.ico", sizes: "16x16 24x24"},
|
||||
{rel: "shortcut icon", href: "http://example.com/test3.ico", sizes: ""},
|
||||
{rel: "apple-touch-icon", href: "http://web-platform.test:8000/test4.ico", sizes: ""},
|
||||
{rel: "icon", href: "http://web-platform.test:8000/test5.ico", sizes: ""},
|
||||
{rel: "icon", href: "http://web-platform.test:8000/test6.ico", sizes: "any"},
|
||||
{rel: "icon", href: "http://web-platform.test:8000/test6.ico", sizes: "32x32"},
|
||||
];
|
||||
|
||||
var receivedEvents = [];
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowsericonchange_event_test.html";
|
||||
|
||||
iframe.addEventListener("mozbrowsericonchange", t.step_func(e => {
|
||||
|
||||
receivedEvents.push({
|
||||
rel: e.detail.rel,
|
||||
href: e.detail.href,
|
||||
sizes: e.detail.sizes,
|
||||
});
|
||||
|
||||
if (receivedEvents.length == expectedEvents.length) {
|
||||
for (var i = 0; i < expectedEvents.length; i++) {
|
||||
var e1 = expectedEvents[i];
|
||||
var e2 = receivedEvents[i];
|
||||
assert_equals(e1.rel, e2.rel);
|
||||
assert_equals(e1.href, e2.href);
|
||||
assert_equals(e1.sizes, e2.sizes);
|
||||
}
|
||||
t.done();
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,22 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="icon" href="/test1.ico" sizes="any">
|
||||
<link rel="icon" href="./test2.ico" sizes="16x16 24x24">
|
||||
<link rel="shortcut icon" href="http://example.com/test3.ico">
|
||||
<link rel="not-icon" href="xxx">
|
||||
<link rel="icon no-href">
|
||||
<link rel="apple-touch-icon" href="/test4.ico">
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
var link = document.createElement("link");
|
||||
link.rel = "icon";
|
||||
link.href = "/test5.ico"
|
||||
document.head.appendChild(link);
|
||||
link = document.querySelector('link[href="/test1.ico"]');
|
||||
link.href = "/test6.ico";
|
||||
setTimeout(() => link.setAttribute("sizes", "32x32"), 0);
|
||||
}, 0);
|
||||
</script>
|
||||
</head>
|
||||
<body>123</body>
|
||||
</html>
|
|
@ -1,75 +0,0 @@
|
|||
<head>
|
||||
<title>Browser API; mozbrowserlocationchange event</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
var url1 = "data:,1";
|
||||
var url2 = "data:,2";
|
||||
var url3 = "data:,3";
|
||||
|
||||
var received_events = []
|
||||
var expected_events = [
|
||||
"about:blank", false, false,
|
||||
url1, true, false,
|
||||
url2, true, false,
|
||||
url3, true, false,
|
||||
url2, true, true,
|
||||
url1, true, true,
|
||||
"about:blank", false, true,
|
||||
url1, true, true,
|
||||
url2, true, true,
|
||||
url3, true, false,
|
||||
];
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
|
||||
var actions = [
|
||||
function() {iframe.src = url1},
|
||||
function() {iframe.src = url2},
|
||||
function() {iframe.src = url3},
|
||||
function() {iframe.goBack()},
|
||||
function() {iframe.goBack()},
|
||||
function() {iframe.goBack()},
|
||||
function() {iframe.goForward()},
|
||||
function() {iframe.goForward()},
|
||||
function() {iframe.goForward()},
|
||||
];
|
||||
|
||||
var action_idx = 0;
|
||||
|
||||
iframe.addEventListener("mozbrowserlocationchange", t.step_func(e => {
|
||||
received_events.push(e.detail.url);
|
||||
received_events.push(e.detail.canGoBack);
|
||||
received_events.push(e.detail.canGoForward);
|
||||
|
||||
if (action_idx < actions.length) {
|
||||
actions[action_idx++]();
|
||||
} else {
|
||||
assert_array_equals(received_events, expected_events);
|
||||
t.done();
|
||||
}
|
||||
}));
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
});
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowserlocationchange_event_iframe.html";
|
||||
iframe.addEventListener("mozbrowserlocationchange", t.step_func(function(e) {
|
||||
var url = e.detail.url || e.detail.uri || e.detail;
|
||||
var filename = url.split("/").pop();
|
||||
if (filename === "yes.html") { t.done(); }
|
||||
}));
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
</script>
|
||||
</body>
|
|
@ -1,6 +0,0 @@
|
|||
<html>
|
||||
<body></body>
|
||||
<script>
|
||||
window.location.assign("yes.html");
|
||||
</script>
|
||||
</html>
|
|
@ -1,46 +0,0 @@
|
|||
<head>
|
||||
<title>mozbrowsersecuritychange event is dispatched when content security state changes</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
const HTTP_URL = "http://web-platform.test:8000";
|
||||
const HTTPS_URL = "https://web-platform.test:8443";
|
||||
|
||||
var urls = [ HTTP_URL, HTTPS_URL, HTTP_URL ];
|
||||
var url_index = 0;
|
||||
|
||||
var expectedEvents = [
|
||||
"insecure",
|
||||
"secure",
|
||||
"insecure",
|
||||
];
|
||||
|
||||
var receivedEvents = [];
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = urls[url_index++];
|
||||
|
||||
iframe.addEventListener("mozbrowsersecuritychange", t.step_func(e => {
|
||||
|
||||
receivedEvents.push(e.detail.state);
|
||||
|
||||
if (receivedEvents.length == expectedEvents.length) {
|
||||
assert_array_equals(receivedEvents, expectedEvents);
|
||||
t.done();
|
||||
} else {
|
||||
iframe.src = urls[url_index++];
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,43 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Dispatch mozbrowsershowmodalprompt event for alert (issue #8352)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body></body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowsershowmodalprompt_event_iframe.html";
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", t.step_func(e => {
|
||||
assert_equals(e.detail.promptType, "alert");
|
||||
assert_equals(e.detail.message, "my alert message");
|
||||
t.done();
|
||||
}));
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowsershowmodalprompt_event_nested_iframe.html";
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", t.step_func(e => {
|
||||
assert_equals(e.detail.promptType, "alert");
|
||||
assert_equals(e.detail.message, "my alert message");
|
||||
t.done();
|
||||
}));
|
||||
document.body.appendChild(iframe);
|
||||
}, "mozbrowsershowmodalprompt event from nested iframes triggering an alert");
|
||||
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowsershowmodalprompt_event_no_params_alert.html";
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", t.step_func(e => {
|
||||
assert_equals(e.detail.promptType, "alert");
|
||||
assert_equals(e.detail.message, "");
|
||||
t.done();
|
||||
}));
|
||||
document.body.appendChild(iframe);
|
||||
}, "Dispatch mozbrowsershowmodalprompt event for alert with no parameters");
|
||||
</script>
|
|
@ -1,6 +0,0 @@
|
|||
<html>
|
||||
<body></body>
|
||||
<script>
|
||||
window.alert("my alert message");
|
||||
</script>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<iframe src="mozbrowsershowmodalprompt_event_iframe.html" />
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
<html>
|
||||
<body></body>
|
||||
<script>
|
||||
window.alert();
|
||||
</script>
|
||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Check if title_changed is too eager (issue #10782)</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body></body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "mozbrowsertitlechangedeagerly_event_iframe.html";
|
||||
iframe.addEventListener("mozbrowsertitlechange", t.step_func(e => {
|
||||
assert_equals(e.type, "mozbrowsertitlechange");
|
||||
assert_not_equals(e.detail, "Bar");
|
||||
}));
|
||||
iframe.addEventListener("load", t.step_func_done());
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
</script>
|
|
@ -1,16 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Foo</title>
|
||||
<script>
|
||||
var text =
|
||||
'<html xmlns="http://www.w3.org/1999/xhtml">' +
|
||||
' <head>' +
|
||||
' <title>Bar</title>' +
|
||||
' </head>' +
|
||||
'</html>';
|
||||
var parser = new DOMParser();
|
||||
var doc = parser.parseFromString(text, "text/xml");
|
||||
</script>
|
||||
</head>
|
||||
<body>Hello world</body>
|
||||
</html>
|
|
@ -1,44 +0,0 @@
|
|||
<head>
|
||||
<meta charset="utf8" />
|
||||
<title>Private browsing</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var privateFrame = document.createElement("iframe");
|
||||
privateFrame.mozbrowser = true;
|
||||
privateFrame.mozprivatebrowsing = true;
|
||||
|
||||
var gotGrandchildResult = false;
|
||||
privateFrame.addEventListener("mozbrowsershowmodalprompt", t.step_func(e => {
|
||||
assert_equals(e.detail.message, 'private=active private=active');
|
||||
gotGrandchildResult = true;
|
||||
}));
|
||||
|
||||
privateFrame.onload = t.step_func(function() {
|
||||
assert_true(gotGrandchildResult);
|
||||
|
||||
var parent = privateFrame.parentNode;
|
||||
parent.removeChild(privateFrame);
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
var promptDisplay = false;
|
||||
iframe.mozbrowser = true;
|
||||
iframe.onload = t.step_func(function() {
|
||||
assert_true(promptDisplay);
|
||||
t.done();
|
||||
});
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", t.step_func(e => {
|
||||
promptDisplay = true;
|
||||
assert_equals(e.detail.message, "");
|
||||
}));
|
||||
iframe.src = "iframe_contentDocument_inner.html";
|
||||
parent.appendChild(iframe);
|
||||
});
|
||||
privateFrame.src = "iframe_privateContent_inner.html";
|
||||
document.body.appendChild(privateFrame);
|
||||
});
|
||||
</script>
|
||||
</body>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>mozbrowserlocationchange with final url after redirect</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body></body>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = "redirect_init.html?pipe=status(302)|header(Location,redirect_final.html)";
|
||||
var i = 0;
|
||||
iframe.addEventListener("mozbrowserlocationchange", t.step_func(e => {
|
||||
switch (++i) {
|
||||
case 1:
|
||||
assert_equals(e.detail.url, "about:blank");
|
||||
break;
|
||||
case 2:
|
||||
assert_equals(e.detail.url, new URL("redirect_final.html", location).href);
|
||||
t.done();
|
||||
break;
|
||||
}
|
||||
}));
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
</script>
|
|
@ -1 +0,0 @@
|
|||
<h1>redirect_final</h1>
|
|
@ -1 +0,0 @@
|
|||
<h1>redirect_init</h1>
|
|
@ -1,35 +0,0 @@
|
|||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
async_test(function(t) {
|
||||
|
||||
const SRC = "data:,foobar";
|
||||
const RELOAD_MAX_COUNT = 5;
|
||||
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.mozbrowser = "true";
|
||||
iframe.src = SRC;
|
||||
|
||||
var reload_count = 0;
|
||||
|
||||
iframe.addEventListener("mozbrowserloadend", t.step_func(e => {
|
||||
reload_count++;
|
||||
assert_equals(SRC, e.target.src);
|
||||
if (reload_count == RELOAD_MAX_COUNT) {
|
||||
t.done();
|
||||
} else {
|
||||
iframe.reload();
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,10 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
def main(request, response):
|
||||
if request.method == 'POST':
|
||||
request.server.stash.put(request.GET["id"], request.body)
|
||||
return ''
|
||||
return request.server.stash.take(request.GET["id"])
|
Loading…
Add table
Add a link
Reference in a new issue