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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/window-property.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/window-property.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/window-property.html b/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/window-property.html
index 1338a196c910d52df01e44291e8884a746002481..59c4a9341f2383d5591cb7d300a6485f79788473 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/window-property.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/window-property.html
@@ -3,7 +3,7 @@
<body>
<script src="../../../resources/js-test.js"></script>
<script>
-description('Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.');
+description('Tests that the window.DeviceOrientationEvent and window.ondeviceorientation and window.ondeviceorientationabsolute properties are present.');
shouldBeTrue("typeof window.DeviceOrientationEvent == 'object'");
shouldBeFalse("typeof window.DeviceOrientationEvent == 'function'");
@@ -11,19 +11,24 @@ shouldBeFalse("window.propertyIsEnumerable('DeviceOrientationEvent')");
shouldBeTrue("'DeviceOrientationEvent' in window");
shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')");
-function hasOnDeviceOrientationProperty()
+function hasProperty(orientationProperty)
{
for (var property in window) {
- if (property == 'ondeviceorientation')
+ if (property == orientationProperty)
return true;
}
return false;
}
shouldBeTrue("typeof window.ondeviceorientation == 'object'");
-shouldBeTrue("hasOnDeviceOrientationProperty()");
+shouldBeTrue("typeof window.ondeviceorientationabsolute == 'object'");
+shouldBeTrue("hasProperty('ondeviceorientation')");
+shouldBeTrue("hasProperty('ondeviceorientationabsolute')");
shouldBeTrue("'ondeviceorientation' in window");
+shouldBeTrue("'ondeviceorientationabsolute' in window");
shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");
+shouldBeTrue("window.hasOwnProperty('ondeviceorientationabsolute')");
</script>
</body>
</html>
+

Powered by Google App Engine
This is Rietveld 408576698