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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom.html

Issue 1424593002: Update layout tests to use internals.visualViewport APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo delete test that depends on "inert-visual-viewport" flag Created 5 years, 1 month 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 | third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <div onwheel="wheel(event)" style="margin: 0px 0; width: 100px; height: 100px; b ackground-color: blue;"></div> 3 <div onwheel="wheel(event)" style="margin: 0px 0; width: 100px; height: 100px; b ackground-color: blue;"></div>
4 <script> 4 <script>
5 var gotWheelEvent = false; 5 var gotWheelEvent = false;
6 var testX = 50; 6 var testX = 50;
7 var testY = 40; 7 var testY = 40;
8 var testScale = 1.5; 8 var testScale = 1.5;
9 var tolerance = 0.001; 9 var tolerance = 0.001;
10 10
(...skipping 22 matching lines...) Expand all
33 shouldBe('window.scrollX', '0'); 33 shouldBe('window.scrollX', '0');
34 shouldBe('window.scrollY', '0'); 34 shouldBe('window.scrollY', '0');
35 shouldBeTrue('gotWheelEvent'); 35 shouldBeTrue('gotWheelEvent');
36 gotWheelEvent = false; 36 gotWheelEvent = false;
37 37
38 // Do a pinch outside of this region and ensure that a zoom occurs, and 38 // Do a pinch outside of this region and ensure that a zoom occurs, and
39 // that it occurs around the pinch area. 39 // that it occurs around the pinch area.
40 eventSender.gesturePinchBegin('touchpad', 150, 100); 40 eventSender.gesturePinchBegin('touchpad', 150, 100);
41 eventSender.gesturePinchUpdate('touchpad', 150, 100, 2.0); 41 eventSender.gesturePinchUpdate('touchpad', 150, 100, 2.0);
42 eventSender.gesturePinchEnd('touchpad', 150, 100); 42 eventSender.gesturePinchEnd('touchpad', 150, 100);
43 shouldBe('window.innerWidth', '400');
44 shouldBe('window.innerHeight', '300');
45 shouldBe('window.scrollX', '75');
46 shouldBe('window.scrollY', '50');
47
48 shouldBeFalse('gotWheelEvent'); 43 shouldBeFalse('gotWheelEvent');
44 if (window.internals) {
45 shouldBe('internals.visualViewportWidth()', '400');
46 shouldBe('internals.visualViewportHeight()', '300');
47 shouldBe('internals.visualViewportScrollX()', '75');
48 shouldBe('internals.visualViewportScrollY()', '50');
49 }
49 } 50 }
50 </script> 51 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698