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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html

Issue 1416123002: Absolute Device Orientation API: blink implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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 src="resources/basic-operation.js"></script>
5 <script> 6 <script>
6 description('Tests the basic operation of DeviceOrientation using the mock.'); 7 description('Tests basic operation of the deviceorientation event using mock dat a.');
7 8 testBasicOperation('deviceorientation');
8 var mockAlpha = 1.1;
9 var mockBeta = 2.2;
10 var mockGamma = 3.3;
11 var mockAbsolute = true;
12
13 if (window.testRunner)
14 testRunner.setMockDeviceOrientation(true, mockAlpha, true, mockBeta, true, m ockGamma, true, mockAbsolute);
15 else
16 debug('This test can not be run without the TestRunner');
17
18 var deviceOrientationEvent;
19 window.addEventListener('deviceorientation', function(e) {
20 deviceOrientationEvent = e;
21 shouldBe('deviceOrientationEvent.alpha', 'mockAlpha');
22 shouldBe('deviceOrientationEvent.beta', 'mockBeta');
23 shouldBe('deviceOrientationEvent.gamma', 'mockGamma');
24 shouldBe('deviceOrientationEvent.absolute', 'mockAbsolute');
25 finishJSTest();
26 });
27
28 window.jsTestIsAsync = true;
29 </script> 9 </script>
30 </body> 10 </body>
31 </html> 11 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698