summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/DeviceOrientation/script-tests
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/DeviceOrientation/script-tests')
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js18
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/event-after-navigation.js6
2 files changed, 4 insertions, 20 deletions
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js
deleted file mode 100644
index a63685b..0000000
--- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js
+++ /dev/null
@@ -1,18 +0,0 @@
-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/dom/DeviceOrientation/script-tests/event-after-navigation.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/event-after-navigation.js
index 2756e55..77e4ec7 100644
--- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/event-after-navigation.js
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/event-after-navigation.js
@@ -5,8 +5,10 @@ if (window.layoutTestController)
else
debug('This test can not be run without the LayoutTestController');
-window.addEventListener('deviceorientation', function() { } );
-window.location = "resources/event-after-navigation-new.html";
+document.body.onload = function() {
+ window.addEventListener('deviceorientation', function() { } );
+ window.location = "resources/event-after-navigation-new.html";
+}
window.jsTestIsAsync = true;
window.successfullyParsed = true;