Update web-platform-tests to revision ef625c6ac28d0ac07ef0c62a6f22c10d14a2623a

This commit is contained in:
WPT Sync Bot 2019-01-23 21:00:43 -05:00
parent 5b41c01bdc
commit bd01f2fabd
125 changed files with 3871 additions and 323 deletions

View file

@ -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

View file

@ -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>