mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
frozen array in XRInputSourcesChangeEvent, update to_frozen_array
doc (#34100)
* frozen array in XRInputSourcesChangeEvent, update o_frozen_array doc Signed-off-by: L Ashwin B <lashwinib@gmail.com> * simplified changes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * added tests Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
f47cc927a0
commit
900d13fc2f
4 changed files with 18 additions and 13 deletions
2
tests/wpt/meta/MANIFEST.json
vendored
2
tests/wpt/meta/MANIFEST.json
vendored
|
@ -844130,7 +844130,7 @@
|
|||
]
|
||||
],
|
||||
"events_input_sources_change.https.html": [
|
||||
"b2a17d4e17ae03bf7ed51e07095aa36dcce033a3",
|
||||
"db8a8233fe55a920a077a644d711a455daf14b6b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src="resources/webxr_test_constants.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict"
|
||||
let testName = "Transient input sources fire events in the right order";
|
||||
|
||||
let watcherDone = new Event("watcherdone");
|
||||
|
@ -25,6 +26,17 @@ let testFunction = function(session, fakeDeviceController, t) {
|
|||
assert_equals(event.session, session);
|
||||
validateSameObject(event);
|
||||
|
||||
assert_throws_js(
|
||||
TypeError,
|
||||
() => { event.added[0] = "test"; },
|
||||
"added array must be frozen"
|
||||
);
|
||||
assert_throws_js(
|
||||
TypeError,
|
||||
() => { event.removed[0] = "test"; },
|
||||
"removed array must be frozen"
|
||||
);
|
||||
|
||||
// The first change event should be adding our controller.
|
||||
if (inputChangeEvents === 1) {
|
||||
validateAdded(event.added, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue