Skip to content

Commit

Permalink
Bug 1485198 [wpt PR 12606] - Fix the error catching logic of should()…
Browse files Browse the repository at this point in the history
….throw() in audit.js, a=testonly

Automatic update from web-platform-testsFix the error catching logic of should().throw() in audit.js

Context: web-platform-tests/wpt#12606

Change the logic of should.throw() so we can handle 3 cases -

should(someExpression).throw();
should(someExpression).throw(TypeError);
should(someExpression).throw(DOMException, 'NotSupportedError');

The generic error (except for DOMException) can be passed without
the second argument, but this change will enforce the second arg
when the expected error is a DOMException type.

This touches many test files, so the work will be done in several
steps:

1. Change audit.js, audionodeoptions.js on both locations.
  (wpt, non-wpt)
2. Update affected test files with the script.
3. Update the rest of test files which can't be updated
  programmatically.

Bug: 865614
Test: All layout tests pass.
Change-Id: I16acacb26c194a0ff950aca05e931195bf55167f
Reviewed-on: https://chromium-review.googlesource.com/1184146
Commit-Queue: Hongchan Choi <hongchanchromium.org>
Reviewed-by: Raymond Toy <rtoychromium.org>
Cr-Commit-Position: refs/heads/master{#587660}

--

wpt-commits: 4fd41de6ecf73b21534c81fc0f516defdca50ab1
wpt-pr: 12606

UltraBlame original commit: 650ffc22e4fef5b4d464b33a09663b47ceb620c5
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent 0230ccb commit 6b37745
Show file tree
Hide file tree
Showing 33 changed files with 283 additions and 142 deletions.
64 changes: 32 additions & 32 deletions testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -4381497,7 +4381497,7 @@ js
:
[
"
0d90a9c630013b9b46ba49c106e0daa89da7032e
df0090c6d605fc0ea5fca224de83e0f472618f9a
"
"
support
Expand Down Expand Up @@ -4381555,7 +4381555,7 @@ js
:
[
"
7ffa4392b05a15dfacafa7d89c902d977ed23266
b7ca020161071437087c349c0e8b59dbf132f764
"
"
support
Expand Down Expand Up @@ -4381825,7 +4381825,7 @@ js
:
[
"
9a77e67ed8634ca53237edcdbf71ca26866b23f9
0d2ea12f6db8257878087646157242cce37ed507
"
"
support
Expand Down Expand Up @@ -4381902,7 +4381902,7 @@ html
:
[
"
2112edeeffcf5688357d98b5161e6c3ab2d761ad
4e27f842ddeda3e2bdd78da7b8ee3f67062d1a9f
"
"
testharness
Expand Down Expand Up @@ -4381996,7 +4381996,7 @@ html
:
[
"
b3de37f119f167469a4337d520345f820a6c4165
7ee6a2237edd209256ac2d46be6893a5305383a0
"
"
testharness
Expand Down Expand Up @@ -4382213,7 +4382213,7 @@ html
:
[
"
b71078d8f8094cdc43ba3adfc33d0f6f15931b33
e0359953d2e909f69066885515f4a3f3cc00ff02
"
"
testharness
Expand Down Expand Up @@ -4382271,7 +4382271,7 @@ html
:
[
"
07a34f07c185f4bc9dcf1b325bb51067610b430a
a2c4581c4e80069f227fe29078bc3eb6409c8b4e
"
"
testharness
Expand Down Expand Up @@ -4382301,7 +4382301,7 @@ html
:
[
"
c5aae1ad53235f7b0f10bc3535d9a3fe5150760f
9845d5eaba384cced3c63ddbf4df1400b31f4994
"
"
testharness
Expand Down Expand Up @@ -4382388,7 +4382388,7 @@ html
:
[
"
5527f44cc9c93e72214ca228fa53e830a8cfcead
f3f16c4c648166dfdb394a41881d4a515d097e86
"
"
testharness
Expand Down Expand Up @@ -4383066,7 +4383066,7 @@ html
:
[
"
0a8c73160e543d6f9d382b536e5c41f7d29c6e9a
4163a8439cd08c1f8cdcb587c569653c2618e021
"
"
testharness
Expand Down Expand Up @@ -4383164,7 +4383164,7 @@ html
:
[
"
c3d3fae2155602bbae7494e0e1439ea1a477b054
386614ff2e20e7abd4e511bf5e9d7d492cddfeb3
"
"
testharness
Expand Down Expand Up @@ -4383194,7 +4383194,7 @@ html
:
[
"
b29c09d395fc2815ee5441fdb06320ad02f2f3f5
65b93222d1002e227ab1ad2e29b6e140b65bd9e4
"
"
testharness
Expand Down Expand Up @@ -4383222,7 +4383222,7 @@ html
:
[
"
14cfbff7e2754c4ee028c7ead599e87849a60922
0b57d27e8e1a7b7339d0e47641cbba27ab419612
"
"
testharness
Expand Down Expand Up @@ -4383563,7 +4383563,7 @@ html
:
[
"
7990d0aee134cb33082e058b41bdaafc69bb507e
df36732c3479f48fbb77a60176cdfa22f58a3611
"
"
testharness
Expand Down Expand Up @@ -4383685,7 +4383685,7 @@ html
:
[
"
a3c789e2f2cbdb31e540bf5cc58850786b4ed73b
a3c11994bbe37f26aa1c2eafbb4f287d559fae34
"
"
testharness
Expand Down Expand Up @@ -4384552,7 +4384552,7 @@ html
:
[
"
7cfd423c071b9a8283e291f200615b2e0a69c797
8b7704a781b712c0129b650da898ed79baad794c
"
"
testharness
Expand Down Expand Up @@ -4384586,7 +4384586,7 @@ html
:
[
"
31e204cdc8d53bfaf0226c34a0e5daf42c813b61
cee9ec82c20f42a5941698fc394e6babb639ace9
"
"
testharness
Expand Down Expand Up @@ -4385195,7 +4385195,7 @@ html
:
[
"
83f53aafb1980bf991f4d12c3a3a472b82df61a6
441e98a251187c3cc600299681306d29df11e618
"
"
testharness
Expand Down Expand Up @@ -4385582,7 +4385582,7 @@ html
:
[
"
f967f0699a321783fe832464b6e72a2a12021746
71a62f176f8eefd9b9168b2c222cc6d1c752d3a5
"
"
testharness
Expand Down Expand Up @@ -4385706,7 +4385706,7 @@ html
:
[
"
115bd9943490ab09efbff70239167911eb83d933
0d6b45c56df0f43a0eac3f364cadca2e4669c6ed
"
"
testharness
Expand Down Expand Up @@ -4385761,7 +4385761,7 @@ html
:
[
"
e0449919ad5e744065bb0257dddfe9b488511812
954c71a96b288530e6c22878fed7a91f42091dc2
"
"
testharness
Expand Down Expand Up @@ -4385791,7 +4385791,7 @@ html
:
[
"
7fa9d6fa5466d2fbfeec8bbcf0718b80b52d2298
9cbb46b6d969a6440fc5b29ee1a20d607912fc83
"
"
testharness
Expand Down Expand Up @@ -4386066,7 +4386066,7 @@ html
:
[
"
11d6f332a1bbc943bec1ad7391610ffe776b955c
ac4f198d7c1449f38ca14963f73b0d3d90b40b5b
"
"
testharness
Expand Down Expand Up @@ -4386204,7 +4386204,7 @@ html
:
[
"
31f115da5321ef52be0ee1ba078b726473694b9c
c8dbeb941bc48f4f3a92907cb140a29f96567057
"
"
testharness
Expand Down Expand Up @@ -4386302,7 +4386302,7 @@ html
:
[
"
cf818330060143078cacbecf77724244eee55cf8
935ceeb715edd2ffdeb7979d6824736fa82b6d2f
"
"
testharness
Expand Down Expand Up @@ -4386521,7 +4386521,7 @@ html
:
[
"
7bbff410650c3bd234c47f080697705b088bd6a4
caf2f85dfd459b2d48526b8f4c13b37b2bceaddb
"
"
testharness
Expand Down Expand Up @@ -4386666,7 +4386666,7 @@ html
:
[
"
98d5dbfded1e2f10e32b14444279760fa2cdeec1
c2460dfa1ddd26a5c2e199873c0b28189275ff83
"
"
testharness
Expand Down Expand Up @@ -4386961,7 +4386961,7 @@ html
:
[
"
79c40dc084753d48970212eafd97ef531c0ae402
7828f05226151ebf7d6c7ec984cae1f90ef848d2
"
"
testharness
Expand Down Expand Up @@ -4387215,7 +4387215,7 @@ html
:
[
"
f480ec8ce51f929417b922adf60a2f9ede800fcd
4b6863103622c5fb248dee3e3eb20d955275d037
"
"
testharness
Expand Down Expand Up @@ -4387306,7 +4387306,7 @@ html
:
[
"
aaf77aec555b720b343a9e63adae924c730510dc
36bf604b296c63b213d99408ab38937c62a755dc
"
"
testharness
Expand Down Expand Up @@ -4387363,7 +4387363,7 @@ html
:
[
"
5475a6210b724ab2d6a0cefedee9c5432953c61f
98a171ad059eaf9b8e24f3f46db4658f76773f19
"
"
testharness
Expand Down Expand Up @@ -4387823,7 +4387823,7 @@ html
:
[
"
caa99aa4031a22f8c538e5622470560a50c4d5bc
9409f1ffce2110c177332388988d7ddb559d3ae2
"
"
testharness
Expand Down
26 changes: 11 additions & 15 deletions testing/web-platform/tests/webaudio/resources/audionodeoptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,26 +203,17 @@ testChannelCount
.
throw
(
DOMException
expectedNodeOptions
.
channelCount
.
errorType
|
|
TypeError
exceptionType
)
;
}
else
{
let
errorType
=
'
NotSupportedError
'
;
[
0
99
Expand Down Expand Up @@ -286,7 +277,10 @@ testValue
.
throw
(
errorType
DOMException
'
NotSupportedError
'
)
;
}
Expand Down Expand Up @@ -495,11 +489,12 @@ testValue
.
throw
(
DOMException
expectedNodeOptions
.
channelCountMode
.
errorType
exceptionType
)
;
}
Expand Down Expand Up @@ -797,11 +792,12 @@ testValue
.
throw
(
DOMException
expectedNodeOptions
.
channelInterpretation
channelCountMode
.
errorType
exceptionType
)
;
}
Expand Down
Loading

0 comments on commit 6b37745

Please sign in to comment.