mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Update web-platform-tests to revision 2f95271debcba3e26e7294beeee4fa5a2ecfbfa0
This commit is contained in:
parent
6fab7a7d84
commit
48add2991a
74 changed files with 789 additions and 263 deletions
|
@ -214,23 +214,11 @@ var WebNFCTest = (() => {
|
|||
return createNDEFError(null);
|
||||
}
|
||||
|
||||
async cancelWatch(id) {
|
||||
cancelWatch(id) {
|
||||
let index = this.watchers_.findIndex(value => value.id === id);
|
||||
if (index === -1) {
|
||||
return createNDEFError(device.mojom.NDEFErrorType.NOT_FOUND);
|
||||
if (index !== -1) {
|
||||
this.watchers_.splice(index, 1);
|
||||
}
|
||||
|
||||
this.watchers_.splice(index, 1);
|
||||
return createNDEFError(null);
|
||||
}
|
||||
|
||||
async cancelAllWatches() {
|
||||
if (this.watchers_.length === 0) {
|
||||
return createNDEFError(device.mojom.NDEFErrorType.NOT_FOUND);
|
||||
}
|
||||
|
||||
this.watchers_.splice(0, this.watchers_.length);
|
||||
return createNDEFError(null);
|
||||
}
|
||||
|
||||
getHWError() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue