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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/updates.html

Issue 1737443002: Make DeviceOrientationEvent.prototype.absolute non-nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 description('Tests that updates to the orientation causes new events to fire.'); 6 description('Tests that updates to the orientation causes new events to fire.');
7 7
8 var mockEvent; 8 var mockEvent;
9 function setMockOrientation(alpha, beta, gamma, absolute) { 9 function setMockOrientation(alpha, beta, gamma, absolute) {
10 mockEvent = {alpha: alpha, beta: beta, gamma: gamma, absolute: absolute}; 10 mockEvent = {alpha: alpha, beta: beta, gamma: gamma, absolute: absolute};
11 if (window.testRunner) 11 if (window.testRunner)
12 testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEve nt.beta, true, mockEvent.gamma, true, mockEvent.absolute); 12 testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEve nt.beta, true, mockEvent.gamma, mockEvent.absolute);
13 else 13 else
14 debug('This test can not be run without the TestRunner'); 14 debug('This test can not be run without the TestRunner');
15 } 15 }
16 16
17 var deviceOrientationEvent; 17 var deviceOrientationEvent;
18 function checkOrientation(event) { 18 function checkOrientation(event) {
19 deviceOrientationEvent = event; 19 deviceOrientationEvent = event;
20 shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha'); 20 shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
21 shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta'); 21 shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
22 shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma'); 22 shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
(...skipping 16 matching lines...) Expand all
39 finishJSTest(); 39 finishJSTest();
40 } 40 }
41 41
42 setMockOrientation(1.1, 2.2, 3.3, true); 42 setMockOrientation(1.1, 2.2, 3.3, true);
43 window.addEventListener('deviceorientation', firstListener); 43 window.addEventListener('deviceorientation', firstListener);
44 44
45 window.jsTestIsAsync = true; 45 window.jsTestIsAsync = true;
46 </script> 46 </script>
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698