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

Unified Diff: chrome/test/data/tab-restore-visibilty.html

Issue 227043004: Restored tabs should set their initial visibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DOMMessageQueue simplifications. Created 6 years, 8 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/tab-restore-visibilty.html
diff --git a/chrome/test/data/tab-restore-visibilty.html b/chrome/test/data/tab-restore-visibilty.html
new file mode 100644
index 0000000000000000000000000000000000000000..f2a2b84aa55786f5fe4d9f8148cf80afaf59f6c4
--- /dev/null
+++ b/chrome/test/data/tab-restore-visibilty.html
@@ -0,0 +1,31 @@
+<script>
+var count = 0;
+
+function setTitle() {
+ // document.title reports the DOM page visibility and RAF count.
+ document.title = document.visibilityState + ' ' + count++;
+
+ if (!window.ready)
+ setTimeout(setReady, count > 10 ? 0 : 100);
+}
+
+document.addEventListener('visibilitychange', setTitle);
+
+(function changeTitle() {
+ window.requestAnimationFrame(changeTitle);
+ setTitle();
+})();
+
+function setReady() {
+ if (!window.ready)
+ sendReady();
+ window.ready = true;
+}
+
+function sendReady() {
+ if (window.domAutomationController) {
+ domAutomationController.setAutomationId(1);
+ domAutomationController.send("READY");
+ }
+}
+</script>
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698