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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/window-property.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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../../resources/js-test.js"></script>
5 <script>
6 description("Tests that the window.DeviceMotionEvent and window.ondevicemotion p roperties are present.");
7
8 function hasDeviceMotionEventProperty()
9 {
10 for (var property in window) {
11 if (property == "DeviceMotionEvent")
12 return true;
13 }
14 return false;
15 }
16
17 shouldBeTrue("typeof window.DeviceMotionEvent == 'object'");
18 shouldBeFalse("typeof window.DeviceMotionEvent == 'function'");
19 shouldBeTrue("hasDeviceMotionEventProperty()");
20 shouldBeTrue("'DeviceMotionEvent' in window");
21 shouldBeTrue("window.hasOwnProperty('DeviceMotionEvent')");
22
23 function hasOnDeviceMotionProperty()
24 {
25 for (var property in window) {
26 if (property == "ondevicemotion")
27 return true;
28 }
29 return false;
30 }
31
32 shouldBeTrue("typeof window.ondevicemotion == 'object'");
33 shouldBeTrue("hasOnDeviceMotionProperty()");
34 shouldBeTrue("'ondevicemotion' in window");
35 shouldBeTrue("window.hasOwnProperty('ondevicemotion')");
36 </script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698