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

Side by Side Diff: third_party/WebKit/LayoutTests/device_orientation/orientation/updates.html

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 <!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, 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');
(...skipping 24 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