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

Side by Side Diff: ManualTests/resize-events.html

Issue 9812042: Revert 106232 - .: Manual test of number of resize events emitted during page generation. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | Source/WebCore/page/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <style>
4 div.block { height: 100px; border: 1px solid black; margin:10px; }
5 </style>
6 <script>
7 var resizecount = 0;
8 var loaded = false;
9 window.onresize = function() {
10 resizecount++;
11 document.getElementById('count1').innerHTML = resizecount;
12 }
13 </script>
14 </head>
15 <body>
16 <div>
17 Test how many resize events are emitted during page load and dynamic con tent generation.
18
19 Do not resize the page. It invalidates the test.
20 <p style="text-indent: 10px" id=result1>
21 Resize events (should be 0 or 1): <span id=count1>0</span>
22 </div>
23 <div id=expandingblock>
24 </div>
25 <script>
26 var blockcount = 0;
27 function addBlock() {
28 var el = document.createElement('div');
29 el.setAttribute('class','block');
30 document.getElementById('expandingblock').appendChild(el);
31 if (++blockcount < 30)
32 setTimeout(addBlock, 20);
33 else
34 finish();
35 }
36 function finish() {
37 var result;
38 // 0 or 1 resize events are acceptable.
39 if (resizecount < 2)
40 result = '<p style="color: green">PASS';
41 else
42 result = '<p style="color: red">FAIL';
43 var resultElement = document.getElementById('result1')
44 resultElement.innerHTML += result;
45 }
46 onload = addBlock;
47 </script>
48 </body>
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/page/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698