mirror of
https://github.com/servo/servo.git
synced 2025-08-30 17:48:20 +01:00
Update web-platform-tests to revision ef625c6ac28d0ac07ef0c62a6f22c10d14a2623a
This commit is contained in:
parent
5b41c01bdc
commit
bd01f2fabd
125 changed files with 3871 additions and 323 deletions
|
@ -5,8 +5,8 @@
|
|||
// test case name. This is useful to avoid lock interference between
|
||||
// test cases.
|
||||
let res_num = 0;
|
||||
self.uniqueName = testCase => {
|
||||
return `${self.location.pathname}-${testCase.name}-${++res_num}`;
|
||||
self.uniqueName = (testCase, prefix) => {
|
||||
return `${self.location.pathname}-${prefix}-${testCase.name}-${++res_num}`;
|
||||
};
|
||||
|
||||
// Inject an iframe showing the given url into the page, and resolve
|
||||
|
|
|
@ -38,6 +38,15 @@ self.addEventListener('message', e => {
|
|||
held.delete(e.data.lock_id);
|
||||
respond({ack: 'release', lock_id: e.data.lock_id});
|
||||
break;
|
||||
|
||||
case 'client_id':
|
||||
navigator.locks.request(e.data.name, async lock => {
|
||||
const lock_state = await navigator.locks.query();
|
||||
const held_lock =
|
||||
lock_state.held.filter(l => l.name === lock.name)[0];
|
||||
respond({ack: 'client_id', client_id: held_lock.clientId});
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue