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

Side by Side Diff: LayoutTests/fast/events/resize-events-fixed-layout.html

Issue 15927026: Enabled using viewport on desktop browsers behind experimental flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP Created 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 div.block { height: 400px; border: 1px solid black; margin:10px; } 5 div.block { height: 400px; border: 1px solid black; margin:10px; }
6 </style> 6 </style>
7 </head> 7 </head>
8 <body> 8 <body>
9 <div> 9 <div>
10 Following actions must not emit resize events: page load, dynamic conten t generation and page scaling.<br/> 10 Following actions must not emit resize events: page load, dynamic conten t generation and page scaling.<br/>
11 11
12 When fixed layout is enabled, changing fixed layout size must emit resiz e event.<br/> 12 When fixed layout is enabled, changing fixed layout size must emit resiz e event.<br/>
13 13
14 The spec DOM Level 2 Events states that the resize event occurs when doc ument view size (a.k.a layout size) is changed. Refer to http://www.w3.org/TR/DO M-Level-2-Events/events.html<br/> 14 The spec DOM Level 2 Events states that the resize event occurs when doc ument view size (a.k.a layout size) is changed. Refer to http://www.w3.org/TR/DO M-Level-2-Events/events.html<br/>
15 However, showing/hiding scrollbars shouldn't be considered a layout size change. Refer to webkit.org/b/80242<br/> 15 However, showing/hiding scrollbars shouldn't be considered a layout size change. Refer to webkit.org/b/80242<br/>
16 </div> 16 </div>
17 <div id=expandingblock> 17 <div id=expandingblock>
18 </div> 18 </div>
19 <pre id="console"></pre> 19 <pre id="console"></pre>
20 <script src="../js/resources/js-test-pre.js"></script> 20 <script src="../js/resources/js-test-pre.js"></script>
21 <script> 21 <script>
22 var resizeEventCount = 0; 22 var resizeEventCount = 0;
23 window.onresize = function() { 23 window.onresize = function() {
24 resizeEventCount++; 24 resizeEventCount++;
25 } 25 }
26 26
27 if (window.testRunner) { 27 if (window.testRunner) {
28 testRunner.dumpAsText(); 28 testRunner.dumpAsText();
29 testRunner.enableFixedLayoutMode(true);
30 testRunner.setFixedLayoutSize(700, 240); 29 testRunner.setFixedLayoutSize(700, 240);
31 testRunner.waitUntilDone(); 30 testRunner.waitUntilDone();
32 } 31 }
33 function test() { 32 function test() {
34 setTimeout(showScrollbar, 20); 33 setTimeout(showScrollbar, 20);
35 } 34 }
36 // Add many div blocks to increase document height more than view height . 35 // Add many div blocks to increase document height more than view height .
37 function showScrollbar() { 36 function showScrollbar() {
38 for (var i = 0; i < 10; i++) { 37 for (var i = 0; i < 10; i++) {
39 var el = document.createElement('div'); 38 var el = document.createElement('div');
(...skipping 14 matching lines...) Expand all
54 } 53 }
55 function finish() { 54 function finish() {
56 // setFixedLayoutSize() must emit a resize event. 55 // setFixedLayoutSize() must emit a resize event.
57 shouldBe("resizeEventCount", "1"); 56 shouldBe("resizeEventCount", "1");
58 if (window.testRunner) 57 if (window.testRunner)
59 testRunner.notifyDone(); 58 testRunner.notifyDone();
60 } 59 }
61 window.onload = test; 60 window.onload = test;
62 </script> 61 </script>
63 </body> 62 </body>
64 </html> 63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698