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

Side by Side Diff: third_party/WebKit/LayoutTests/device_orientation/orientation/resources/basic-operation.js

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

Powered by Google App Engine
This is Rietveld 408576698