| Index: LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js
|
| diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js
|
| index 3536aaef46e68e2fccd1c4b69a027974517b7d14..1c823af655cf5511cef3736c341ebd43a106a288 100644
|
| --- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js
|
| +++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/multiple-frames.js
|
| @@ -1,11 +1,18 @@
|
| description('Tests using DeviceOrientation from multiple frames.');
|
|
|
| +var mockEvent = {alpha: 1.1, beta: 2.2, gamma: 3.3, absolute: true};
|
| +if (window.testRunner)
|
| + testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.beta, true, mockEvent.gamma, true, mockEvent.absolute);
|
| +else
|
| + debug('This test can not be run without the TestRunner');
|
| +
|
| var deviceOrientationEvent;
|
| function checkOrientation(event) {
|
| deviceOrientationEvent = event;
|
| shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
|
| shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
|
| shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
|
| + shouldBe('deviceOrientationEvent.absolute', 'mockEvent.absolute');
|
| }
|
|
|
| var hasMainFrameEventFired = false;
|
| @@ -27,12 +34,6 @@ function maybeFinishTest() {
|
| finishJSTest();
|
| }
|
|
|
| -var mockEvent = {alpha: 1.1, beta: 2.2, gamma: 3.3};
|
| -if (window.testRunner)
|
| - testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.beta, true, mockEvent.gamma);
|
| -else
|
| - debug('This test can not be run without the TestRunner');
|
| -
|
| var childFrame = document.createElement('iframe');
|
| document.body.appendChild(childFrame);
|
| childFrame.contentWindow.addEventListener('deviceorientation', childFrameListener);
|
|
|