OLD | NEW |
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 Loading... |
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> |
OLD | NEW |