summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/file_bug1379762-2.html
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-05-16 17:18:04 +0200
committerGitHub <noreply@github.com>2018-05-16 17:18:04 +0200
commitdb852311451f95679fff9b9bd19c7ce3d624d69c (patch)
treea8b9793117d86bccd0072d06717dcb4a5d604aa5 /docshell/test/navigation/file_bug1379762-2.html
parentf7cf18bfe1201e923e8c341f5ce7f5f083b5e280 (diff)
parentd1184bfb4939e76f3aa442daa90dc5cca3a850e4 (diff)
downloadUXP-db852311451f95679fff9b9bd19c7ce3d624d69c.tar
UXP-db852311451f95679fff9b9bd19c7ce3d624d69c.tar.gz
UXP-db852311451f95679fff9b9bd19c7ce3d624d69c.tar.lz
UXP-db852311451f95679fff9b9bd19c7ce3d624d69c.tar.xz
UXP-db852311451f95679fff9b9bd19c7ce3d624d69c.zip
Merge pull request #360 from janekptacijarabaci/readview_pageshow_persisted_1
Fix: Reader Mode icon in urlbar is not displayed when close the Reader Mode view
Diffstat (limited to 'docshell/test/navigation/file_bug1379762-2.html')
-rw-r--r--docshell/test/navigation/file_bug1379762-2.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/docshell/test/navigation/file_bug1379762-2.html b/docshell/test/navigation/file_bug1379762-2.html
new file mode 100644
index 000000000..86033cb2e
--- /dev/null
+++ b/docshell/test/navigation/file_bug1379762-2.html
@@ -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>