| Index: LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js
|
| diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js
|
| index df6a321f2c6ffdc9c980435d78727b8fad46b871..90899262a75d8d042c377499e8879543c0c9b03e 100644
|
| --- a/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js
|
| +++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/updates.js
|
| @@ -1,10 +1,10 @@
|
| description('Tests that updates to the orientation causes new events to fire.');
|
|
|
| var mockEvent;
|
| -function setMockOrientation(alpha, beta, gamma) {
|
| - mockEvent = {alpha: alpha, beta: beta, gamma: gamma};
|
| +function setMockOrientation(alpha, beta, gamma, absolute) {
|
| + mockEvent = {alpha: alpha, beta: beta, gamma: gamma, absolute: absolute};
|
| if (window.testRunner)
|
| - testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.beta, true, mockEvent.gamma);
|
| + 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');
|
| }
|
| @@ -15,13 +15,17 @@ function checkOrientation(event) {
|
| shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
|
| shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
|
| shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
|
| + shouldBe('deviceOrientationEvent.absolute', 'mockEvent.absolute');
|
| }
|
|
|
| function firstListener(event) {
|
| checkOrientation(event);
|
| window.removeEventListener('deviceorientation', firstListener);
|
| + setTimeout(function(){initUpdateListener();}, 0);
|
| +}
|
|
|
| - setMockOrientation(11.1, 22.2, 33.3);
|
| +function initUpdateListener() {
|
| + setMockOrientation(11.1, 22.2, 33.3, true);
|
| window.addEventListener('deviceorientation', updateListener);
|
| }
|
|
|
| @@ -30,7 +34,7 @@ function updateListener(event) {
|
| finishJSTest();
|
| }
|
|
|
| -setMockOrientation(1.1, 2.2, 3.3);
|
| +setMockOrientation(1.1, 2.2, 3.3, true);
|
| window.addEventListener('deviceorientation', firstListener);
|
|
|
| window.jsTestIsAsync = true;
|
|
|