This repository has been archived by the owner on Aug 20, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 885221 - Page hide event does not update window status if persist…
…ed is true. r=hskupin
- Loading branch information
1 parent
2f85a34
commit 05f859f
Showing
4 changed files
with
60 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type="text/javascript" > | ||
function unloadHandler() { | ||
window.removeEventListener('unload', unloadHandler, false); | ||
}; | ||
window.addEventListener('unload', unloadHandler, false); | ||
</script> | ||
<title>Page not Back-Forward Cached</title> | ||
</head> | ||
<body> | ||
<h1>Page not Back-Forward Cached</h1> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ type = javascript | |
|
||
[testPageLoad.js] | ||
[testPageLoadBfCache.js] | ||
[testReloadPage.js] | ||
[testSaveScreenshot.js] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* 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/. */ | ||
|
||
"use strict"; | ||
|
||
const BASE_URL = collector.addHttpResource("../../data/"); | ||
const TEST_DATA = [ | ||
BASE_URL + "link.html", | ||
BASE_URL + "no_bfcache.html", | ||
"about:blank", | ||
"about:blocked", | ||
"about:addons", | ||
"about:config", | ||
"about:newtab" | ||
]; | ||
|
||
var setupModule = function (aModule) { | ||
aModule.controller = mozmill.getBrowserController(); | ||
} | ||
|
||
var testReloadPageAfterTabChange = function () { | ||
TEST_DATA.forEach(function (aUrl) { | ||
controller.open(aUrl); | ||
controller.waitForPageLoad(); | ||
|
||
// Open a new tab and close it | ||
controller.mainMenu.click("#menu_newNavigatorTab"); | ||
controller.mainMenu.click("#menu_close"); | ||
|
||
controller.open(aUrl); | ||
controller.waitForPageLoad(); | ||
}); | ||
} |