Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4988)

Unified Diff: chrome/test/data/prerender/prerender_visibility_hidden_quick.html

Issue 7736003: Revert 98539 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/prerender/prerender_visibility_hidden_quick.html
===================================================================
--- chrome/test/data/prerender/prerender_visibility_hidden_quick.html (revision 98544)
+++ chrome/test/data/prerender/prerender_visibility_hidden_quick.html (working copy)
@@ -1,41 +0,0 @@
-<html>
-<!--
-This test checks the visibility API when a prerendered page is visited without
-being displayed, before the page has finished loading.
--->
-<head>
-<title>Prerender Visibility Hidden Quick Switch</title>
-
-<script>
-// Checks visibility state while the page is still loading.
-var lastState = document.webkitVisibilityState;
-var loadingStatePassed = document.webkitHidden && lastState != 'visible';
-var unexpectedStateChange = false;
-
-function onVisibilityChange(event) {
- if (lastState == 'hidden' ||
- document.webkitVisibilityState != 'hidden') {
- unexpectedStateChange = true;
- return;
- }
- lastState = document.webkitVisibilityState;
-}
-
-document.addEventListener('webkitvisibilitychange',
- onVisibilityChange,
- false);
-
-// Checks that either the first visibility state was 'prerender' and there
-// was one and only one visibility change event to 'hidden', or visibility
-// was always 'hidden'.
-function DidDisplayPass() {
- return loadingStatePassed &&
- !unexpectedStateChange &&
- 'hidden' == document.webkitVisibilityState &&
- document.webkitHidden;
-}
-</script>
-
-</head>
-<body></body>
-</html>
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/test/data/prerender/prerender_visibility_quick.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698