mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Bug 1379762 part 2. Use a more reliable test to figure out when we can skip firing onload in nsDocumentViewer::LoadComplete
Issue #357
This commit is contained in:
parent
eb80674e82
commit
e29bf72ab4
4 changed files with 59 additions and 2 deletions
43
docshell/test/navigation/file_bug1379762-2.html
Normal file
43
docshell/test/navigation/file_bug1379762-2.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bug 1379762</title>
|
||||
</head>
|
||||
<script type="text/just-data">
|
||||
onunload = null; // enable bfcache
|
||||
++opener.testCount;
|
||||
onpageshow = function(e) {
|
||||
opener.ok(!e.persisted, "Pageshow should not be coming from bfcache " + opener.testCount);
|
||||
}
|
||||
if (opener.testCount == 1) {
|
||||
onload = function () {
|
||||
setTimeout(function() {
|
||||
document.write(testScript);
|
||||
}, 0);
|
||||
}
|
||||
} else if (opener.testCount == 2) {
|
||||
// Do this async, just in case.
|
||||
setTimeout(function() {
|
||||
history.back();
|
||||
}, 0);
|
||||
} else if (opener.testCount == 3) {
|
||||
// Do this async, just in case.
|
||||
setTimeout(function() {
|
||||
history.forward();
|
||||
}, 0);
|
||||
} else if (opener.testCount == 4) {
|
||||
onload = function() {
|
||||
opener.nextTest();
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var data = document.querySelector("script[type='text/just-data']").textContent;
|
||||
// Store the string that does all out work in a global variable, so we can
|
||||
// get at it later.
|
||||
var testScript = "<script>" + data + "</" + "script>";
|
||||
document.write(testScript);
|
||||
</script>
|
||||
</html>
|
||||
|
|
@ -59,7 +59,7 @@ skip-if = (toolkit == 'android') || (!debug && (os == 'mac' || os == 'win')) # B
|
|||
skip-if = (toolkit == 'android') || (debug && e10s) #too slow on Android 4.3 aws only; bug 1030403; bug 1263213 for debug e10s
|
||||
[test_sessionhistory.html]
|
||||
skip-if = toolkit == 'android' #RANDOM
|
||||
support-files = file_bug1379762-1.html
|
||||
support-files = file_bug1379762-1.html file_bug1379762-2.html
|
||||
[test_sibling-matching-parent.html]
|
||||
[test_sibling-off-domain.html]
|
||||
[test_triggeringprincipal_frame_nav.html]
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ var testFiles =
|
|||
"file_scrollRestoration.html",
|
||||
"file_bug1300461.html",
|
||||
"file_bug1379762-1.html",
|
||||
"file_bug1379762-2.html",
|
||||
];
|
||||
var testCount = 0; // Used by the test files.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue