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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <script>
2 var count = 0;
3
4 function setTitle() {
5 // document.title reports the DOM page visibility and RAF count.
6 document.title = document.visibilityState + ' ' + count++;
7
8 if (!window.ready)
9 setTimeout(setReady, count > 10 ? 0 : 100);
10 }
11
12 document.addEventListener('visibilitychange', setTitle);
13
14 (function changeTitle() {
15 window.requestAnimationFrame(changeTitle);
16 setTitle();
17 })();
18
19 function setReady() {
20 if (!window.ready)
21 sendReady();
22 window.ready = true;
23 }
24
25 function sendReady() {
26 if (window.domAutomationController) {
27 domAutomationController.setAutomationId(1);
28 domAutomationController.send("READY");
29 }
30 }
31 </script>
OLDNEW
« 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