From d06194330da2bb8da887d2e1adeacb3a5c1504b2 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 5 Jan 2011 12:15:11 +0000 Subject: Merge WebKit at r72805: Initial merge by Git Note that this is a backwards merge from Chromium release 9.0.600.0 to 9.0.597.0, to align with the Chromium 9 stable release branch. Change-Id: I5d2bb4e8cee9d39ae8485abf48bdb55ecf8b3790 --- .../create-event-onorientationchange-expected.txt | 16 ++++++++++++++++ .../create-event-onorientationchange.html | 13 +++++++++++++ .../script-tests/create-event-onorientationchange.js | 18 ++++++++++++++++++ LayoutTests/fast/js/resources/standalone-pre.js | 2 -- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt create mode 100644 LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html create mode 100644 LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js (limited to 'LayoutTests/fast') diff --git a/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt new file mode 100644 index 0000000..0f0aac6 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt @@ -0,0 +1,16 @@ +Tests that document.createEvent() works with orientationChange + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +FAIL... orientationChange event doesn't appear to be enabled or implemented. + + +PASS successfullyParsed is true + +TEST COMPLETE + + + + diff --git a/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html new file mode 100644 index 0000000..7a033e0 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html @@ -0,0 +1,13 @@ + + + + + + +

+

+
+ + + + diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js new file mode 100644 index 0000000..a63685b --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js @@ -0,0 +1,18 @@ +description('Tests that document.createEvent() works with orientationChange') + +function handleOrientationChange() +{ + document.getElementById('result').innerHTML = "PASS"; +} + +window.addEventListener('onorientationchange', handleOrientationChange, false); + +try { + var event = document.createEvent("OrientationEvent"); + event.initEvent("orientationchange", false, false); + window.dispatchEvent(event); +} catch(e) { + document.getElementById('result').innerHTML = "FAIL... orientationChange event doesn't appear to be enabled or implemented."; +} + +window.successfullyParsed = true; diff --git a/LayoutTests/fast/js/resources/standalone-pre.js b/LayoutTests/fast/js/resources/standalone-pre.js index b80c3cb..692f1c1 100644 --- a/LayoutTests/fast/js/resources/standalone-pre.js +++ b/LayoutTests/fast/js/resources/standalone-pre.js @@ -27,8 +27,6 @@ function testFailed(msg) function areArraysEqual(_a, _b) { - if (Object.prototype.toString.call(_a) != Object.prototype.toString.call([])) - return false; if (_a.length !== _b.length) return false; for (var i = 0; i < _a.length; i++) -- cgit v1.1