summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/orientation-event/orientation/updates.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/orientation-event/orientation/updates.https.html')
-rw-r--r--testing/web-platform/tests/orientation-event/orientation/updates.https.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/orientation-event/orientation/updates.https.html b/testing/web-platform/tests/orientation-event/orientation/updates.https.html
new file mode 100644
index 0000000000..c84588d598
--- /dev/null
+++ b/testing/web-platform/tests/orientation-event/orientation/updates.https.html
@@ -0,0 +1,19 @@
+<!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';
+
+sensor_test(async (t, sensorProvider) => {
+ const orientationData1 = generateOrientationData(1.1, 2.2, 3.3, false);
+ setMockOrientationData(sensorProvider, orientationData1);
+ await waitForEvent(getExpectedOrientationEvent(orientationData1));
+
+ const orientationData2 = generateOrientationData(11.1, 22.2, 33.3, false);
+ setMockOrientationData(sensorProvider, orientationData2);
+ await waitForEvent(getExpectedOrientationEvent(orientationData2));
+}, 'Tests that updates to the orientation causes new events to fire.');
+</script>