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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/multiple-frames.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 using DeviceOrientation from multiple frames.'); 6 description('Tests using DeviceOrientation from multiple frames.');
7 7
8 var mockEvent = {alpha: 1.1, beta: 2.2, gamma: 3.3, absolute: true}; 8 var mockEvent = {alpha: 1.1, beta: 2.2, gamma: 3.3, absolute: true};
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.b eta, true, mockEvent.gamma, true, mockEvent.absolute); 10 testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.b eta, true, mockEvent.gamma, mockEvent.absolute);
11 else 11 else
12 debug('This test can not be run without the TestRunner'); 12 debug('This test can not be run without the TestRunner');
13 13
14 var deviceOrientationEvent; 14 var deviceOrientationEvent;
15 function checkOrientation(event) { 15 function checkOrientation(event) {
16 deviceOrientationEvent = event; 16 deviceOrientationEvent = event;
17 shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha'); 17 shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
18 shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta'); 18 shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
19 shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma'); 19 shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
20 shouldBe('deviceOrientationEvent.absolute', 'mockEvent.absolute'); 20 shouldBe('deviceOrientationEvent.absolute', 'mockEvent.absolute');
(...skipping 21 matching lines...) Expand all
42 var childFrame = document.createElement('iframe'); 42 var childFrame = document.createElement('iframe');
43 document.body.appendChild(childFrame); 43 document.body.appendChild(childFrame);
44 childFrame.contentWindow.addEventListener('deviceorientation', childFrameListene r); 44 childFrame.contentWindow.addEventListener('deviceorientation', childFrameListene r);
45 45
46 window.addEventListener('deviceorientation', mainFrameListener); 46 window.addEventListener('deviceorientation', mainFrameListener);
47 47
48 window.jsTestIsAsync = true; 48 window.jsTestIsAsync = true;
49 </script> 49 </script>
50 </body> 50 </body>
51 </html> 51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698