summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/orientation-event/orientation/multiple-event-listeners.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/orientation-event/orientation/multiple-event-listeners.https.html')
-rw-r--r--testing/web-platform/tests/orientation-event/orientation/multiple-event-listeners.https.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/orientation-event/orientation/multiple-event-listeners.https.html b/testing/web-platform/tests/orientation-event/orientation/multiple-event-listeners.https.html
new file mode 100644
index 0000000000..a32f9f3a1f
--- /dev/null
+++ b/testing/web-platform/tests/orientation-event/orientation/multiple-event-listeners.https.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="../resources/orientation-event-helpers.js"></script>
+<script>
+'use strict';
+
+promise_test(async (t) => {
+ const helper = new SensorTestHelper(t, 'deviceorientation');
+ await helper.grantSensorsPermissions();
+ await helper.initializeSensors();
+
+ const orientationData1 = generateOrientationData(1, 2, 3, false);
+ await helper.setData(orientationData1);
+
+ await Promise.all([
+ waitForEvent(getExpectedOrientationEvent(orientationData1)),
+ waitForEvent(getExpectedOrientationEvent(orientationData1))
+ ]);
+
+ const orientationData2 = generateOrientationData(11, 12, 13, false);
+ await helper.setData(orientationData2);
+ await waitForEvent(getExpectedOrientationEvent(orientationData2));
+}, 'Tests using multiple event handlers for the Device Orientation API.');
+</script>