summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js')
-rw-r--r--LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js
new file mode 100644
index 0000000..0f4bc51
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js
@@ -0,0 +1,16 @@
+description('Tests that events are never fired sycnhronously from a call to window.addEventListener().');
+
+if (window.layoutTestController)
+ layoutTestController.setMockDeviceOrientation(true, 1.1, true, 2.2, true, 3.3);
+else
+ debug('This test can not be run without the LayoutTestController');
+
+var hasAddEventListenerReturned = false;
+window.addEventListener('deviceorientation', function() {
+ shouldBeTrue('hasAddEventListenerReturned');
+ finishJSTest();
+});
+hasAddEventListenerReturned = true;
+
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;