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

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

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
(Empty)
1 // This test can be used to test device orientation event types: 'deviceorientat ion' and 'deviceorientationabsolute'.
2 function testBasicOperation(eventType) {
3 window.jsTestIsAsync = true;
4 if (!window.testRunner)
5 debug('This test can not be run without the TestRunner');
6
7 mockAlpha = 1.1;
8 mockBeta = 2.2;
9 mockGamma = 3.3;
10 mockAbsolute = true;
11 testRunner.setMockDeviceOrientation(true, mockAlpha, true, mockBeta, true, m ockGamma, true, mockAbsolute);
12
13 window.addEventListener(eventType, function(e) {
14 event = e;
15 shouldBe('event.alpha', 'mockAlpha');
16 shouldBe('event.beta', 'mockBeta');
17 shouldBe('event.gamma', 'mockGamma');
18 shouldBe('event.absolute', 'mockAbsolute');
19 finishJSTest();
20 });
21 }
22
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698