2010-07-06 Steve Block <steveblock@google.com>
authorsteveblock@google.com <steveblock@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jul 2010 11:51:16 +0000 (11:51 +0000)
committersteveblock@google.com <steveblock@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jul 2010 11:51:16 +0000 (11:51 +0000)
        Reviewed by Adam Barth.

        DeviceOrientationEventConstructor should be exposed at window.DeviceOrientationEvent
        https://bugs.webkit.org/show_bug.cgi?id=41685

        Test: fast/dom/Window/window-properties-device-orientation.html
              fast/dom/DeviceOrientation/window-property.txt

        * page/DOMWindow.idl:
2010-07-06  Steve Block  <steveblock@google.com>

        Reviewed by Adam Barth.

        DeviceOrientationEventConstructor should be exposed at window.DeviceOrientationEvent
        https://bugs.webkit.org/show_bug.cgi?id=41685

        This required fast/dom/Window/window-properties-on-device-orientation.html to be renamed
        to fast/dom/Window/window-properties-device-orientation.html and updated.

        * fast/dom/DeviceOrientation/script-tests/window-property.js:
        * fast/dom/DeviceOrientation/window-property-expected.txt:
        * fast/dom/Window/window-properties-device-orientation-expected.txt: Copied from LayoutTests/fast/dom/Window/window-properties-on-device-orientation-expected.txt.
        * fast/dom/Window/window-properties-device-orientation.html: Copied from LayoutTests/fast/dom/Window/window-properties-on-device-orientation.html.
        * fast/dom/Window/window-properties-on-device-orientation-expected.txt: Removed.
        * fast/dom/Window/window-properties-on-device-orientation.html: Removed.
        * fast/dom/Window/window-properties.html:
        * platform/gtk/Skipped:
        * platform/mac/Skipped:
        * platform/qt/Skipped:
        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62653 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/DeviceOrientation/script-tests/window-property.js
LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt
LayoutTests/fast/dom/Window/window-properties-device-orientation-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-properties-device-orientation.html [moved from LayoutTests/fast/dom/Window/window-properties-on-device-orientation.html with 88% similarity]
LayoutTests/fast/dom/Window/window-properties-on-device-orientation-expected.txt [deleted file]
LayoutTests/fast/dom/Window/window-properties.html
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/page/DOMWindow.idl

index 73fe565b31ba03e5ecc17f014d1a0b59ed6364d7..33cfe724423c7f1644170d35d58552dbaba15d1f 100644 (file)
@@ -1,3 +1,25 @@
+2010-07-06  Steve Block  <steveblock@google.com>
+
+        Reviewed by Adam Barth.
+
+        DeviceOrientationEventConstructor should be exposed at window.DeviceOrientationEvent
+        https://bugs.webkit.org/show_bug.cgi?id=41685
+
+        This required fast/dom/Window/window-properties-on-device-orientation.html to be renamed
+        to fast/dom/Window/window-properties-device-orientation.html and updated.
+
+        * fast/dom/DeviceOrientation/script-tests/window-property.js:
+        * fast/dom/DeviceOrientation/window-property-expected.txt:
+        * fast/dom/Window/window-properties-device-orientation-expected.txt: Copied from LayoutTests/fast/dom/Window/window-properties-on-device-orientation-expected.txt.
+        * fast/dom/Window/window-properties-device-orientation.html: Copied from LayoutTests/fast/dom/Window/window-properties-on-device-orientation.html.
+        * fast/dom/Window/window-properties-on-device-orientation-expected.txt: Removed.
+        * fast/dom/Window/window-properties-on-device-orientation.html: Removed.
+        * fast/dom/Window/window-properties.html:
+        * platform/gtk/Skipped:
+        * platform/mac/Skipped:
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+
 2010-07-07  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r62645.
index 9a5cc5509cbb31413113e29d577b5e613cc5a4a2..e7458b46221f1cf37c05d7eaf597e6f534058ca6 100644 (file)
@@ -1,4 +1,18 @@
-description("Tests that the window.ondeviceorientation property is present.");
+description("Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.");
+
+function hasDeviceOrientationEventProperty()
+{
+    for (var property in window) {
+        if (property == "DeviceOrientationEvent")
+            return true;
+    }
+    return false;
+}
+
+shouldBeTrue("typeof window.DeviceOrientationEvent == 'function'");
+shouldBeTrue("hasDeviceOrientationEventProperty()");
+shouldBeTrue("'DeviceOrientationEvent' in window");
+shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')");
 
 function hasOnDeviceOrientationProperty()
 {
@@ -12,6 +26,6 @@ function hasOnDeviceOrientationProperty()
 shouldBeTrue("typeof window.ondeviceorientation == 'object'");
 shouldBeTrue("hasOnDeviceOrientationProperty()");
 shouldBeTrue("'ondeviceorientation' in window");
-shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");
+shouldBeFalse("window.hasOwnProperty('ondeviceorientation')");
 
 window.successfullyParsed = true;
index 5a0f1d49f730eeb6261b271a26e0a9e28c5f794f..95075a0443ad9109c7cbdc243f6ce935ff11b863 100644 (file)
@@ -1,12 +1,16 @@
-Tests that the window.ondeviceorientation property is present.
+Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS typeof window.DeviceOrientationEvent == 'function' is true
+PASS hasDeviceOrientationEventProperty() is true
+PASS 'DeviceOrientationEvent' in window is true
+PASS window.hasOwnProperty('DeviceOrientationEvent') is true
 PASS typeof window.ondeviceorientation == 'object' is true
 PASS hasOnDeviceOrientationProperty() is true
 PASS 'ondeviceorientation' in window is true
-PASS window.hasOwnProperty('ondeviceorientation') is true
+PASS window.hasOwnProperty('ondeviceorientation') is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Window/window-properties-device-orientation-expected.txt b/LayoutTests/fast/dom/Window/window-properties-device-orientation-expected.txt
new file mode 100644 (file)
index 0000000..62801eb
--- /dev/null
@@ -0,0 +1,5 @@
+This test dumps all of the properties that are reachable from the window.DeviceOrientationEvent and window.ondeviceorientation objects, along with their types.
+
+window.DeviceOrientationEvent [function]
+window.ondeviceorientation [null]
+
similarity index 88%
rename from LayoutTests/fast/dom/Window/window-properties-on-device-orientation.html
rename to LayoutTests/fast/dom/Window/window-properties-device-orientation.html
index 2b404859bf1e2d9d5c227d5b4d21ef9350024ac6..97e00bb08d8a884850b32b11fe47df35201f99ee 100644 (file)
@@ -1,5 +1,4 @@
-<p>This test dumps all of the properties that are reachable from the window.ondeviceorientation
-object, along with their types.</p>
+<p>This test dumps all of the properties that are reachable from the window.DeviceOrientationEvent and window.ondeviceorientation objects, along with their types.</p>
 <hr>
 <pre id="pre"></pre>
 
@@ -31,7 +30,7 @@ function tryEval(string)
 
 function typeOfNullAware(value)
 {
-    if (typeof value == "object" && value == null) //;
+    if (typeof value == "object" && value == null)
         return "null";
     return typeof value;
 }
@@ -62,7 +61,7 @@ function logValue(valueName)
         return;
 
     // Avoid infinite recursion
-    if (valueType == "object" && value.__visitedByLogValue__) { //;
+    if (valueType == "object" && value.__visitedByLogValue__) {
         log(valueName + " [printed above as " + value.__nameWhenVisitedByLogValue__ + "]\n");
         return;
     }
@@ -89,6 +88,7 @@ function logProperties(object, objectName)
     }
 }
 
+logValue('window.DeviceOrientationEvent');
 logValue('window.ondeviceorientation');
 flushLog();
 </script>
diff --git a/LayoutTests/fast/dom/Window/window-properties-on-device-orientation-expected.txt b/LayoutTests/fast/dom/Window/window-properties-on-device-orientation-expected.txt
deleted file mode 100644 (file)
index 1dbf392..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-This test dumps all of the properties that are reachable from the window.ondeviceorientation object, along with their types.
-
-window.ondeviceorientation [null]
-
index 050d80608a50d14da80e4c6aa4be46eeb15c3f5c..c722d2804a629f4ffefacb7da59c2ddb81ea1a8c 100644 (file)
@@ -83,6 +83,7 @@ var __skip__ = {
     "window.Blob.prototype.slice" : 1,
     "window.FileError" : 1,
     "window.FileReader" : 1,
+    "window.DeviceOrientationEvent" : 1,
     "window.ondeviceorientation" : 1,
 
     // showModalDialog is not implemented on all platforms in DumpRenderTree.
index 884e19478fc437d716c51c3e5c0c56a8e42a2697..7686a3730c0bc57161496dfb0049ec376be1d1b6 100644 (file)
@@ -1191,7 +1191,7 @@ fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml
 fast/dom/Window/new-window-opener.html
 fast/dom/Window/webkitConvertPoint.html
 fast/dom/Window/window-onFocus.html
-fast/dom/Window/window-properties-on-device-orientation.html
+fast/dom/Window/window-properties-device-orientation.html
 fast/dom/Window/window-resize-and-move-arguments.html
 fast/dom/Window/window-resize.html
 fast/dom/Window/window-xy-properties.html
@@ -5830,4 +5830,4 @@ editing/pasteboard/5761530-1.html
 # Speech input is not yet enabled.
 fast/forms/input-appearance-numberandspeech.html
 fast/forms/input-appearance-searchandspeech.html
-fast/forms/input-appearance-speechbutton.html
\ No newline at end of file
+fast/forms/input-appearance-speechbutton.html
index 58ae98391b713d060f21e23cb2691724a81a6180..f4c07df6614fdc3df5862e8717ac76873f23f6a7 100644 (file)
@@ -280,7 +280,7 @@ storage/indexeddb
 
 # This port doesn't support DeviceOrientation.
 fast/dom/DeviceOrientation
-fast/dom/Window/window-properties-on-device-orientation.html
+fast/dom/Window/window-properties-device-orientation.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=39908
 fast/dom/Geolocation/maximum-age.html
index c15193776fa2dd7227c21a15f5975b5c5742d5af..b0c6c291489c180f605078bbb989675f8cc79566 100644 (file)
@@ -82,7 +82,7 @@ svg/webarchive
 
 # This port doesn't support DeviceOrientation.
 fast/dom/DeviceOrientation
-fast/dom/Window/window-properties-on-device-orientation.html
+fast/dom/Window/window-properties-device-orientation.html
 
 # IndexedDB is not yet enabled.
 storage/indexeddb
index 4c99272b9c095744679a138306736fc6bfa51063..13cd4dab29e21a619cf12ae9582cbbd82e1db987 100644 (file)
@@ -898,7 +898,7 @@ storage/indexeddb
 
 # This port doesn't support DeviceOrientation.
 fast/dom/DeviceOrientation
-fast/dom/Window/window-properties-on-device-orientation.html
+fast/dom/Window/window-properties-device-orientation.html
 
 # LayoutTestController::pageProperty is not implemented for WIN yet.
 printing/page-rule-selection.html
index 77f44f0d08dbc70207e6a61607e61e62b197adad..c18923b90077332c2e807e91a2ea5025d42990d1 100644 (file)
@@ -1,3 +1,15 @@
+2010-07-06  Steve Block  <steveblock@google.com>
+
+        Reviewed by Adam Barth.
+
+        DeviceOrientationEventConstructor should be exposed at window.DeviceOrientationEvent
+        https://bugs.webkit.org/show_bug.cgi?id=41685
+
+        Test: fast/dom/Window/window-properties-device-orientation.html
+              fast/dom/DeviceOrientation/window-property.txt
+
+        * page/DOMWindow.idl:
+
 2010-07-07  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r62645.
index b752b60c9883ab45127a5def2a6698d52d5123f3..1b7c1d5f839ed562777c14130d14348cb42ecef1 100644 (file)
@@ -304,6 +304,7 @@ module window {
         attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
         attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
 
+        attribute [Conditional=DEVICE_ORIENTATION] DeviceOrientationEventConstructor DeviceOrientationEvent;
         attribute [Conditional=DEVICE_ORIENTATION] EventListener ondeviceorientation;
 
         // EventTarget interface