diff --git a/FileAPI/blob/Blob-constructor-endings.html b/FileAPI/blob/Blob-constructor-endings.html index e5426bb979d6fb..04edd2a303b135 100644 --- a/FileAPI/blob/Blob-constructor-endings.html +++ b/FileAPI/blob/Blob-constructor-endings.html @@ -37,7 +37,7 @@ {} ].forEach(value => test(t => { assert_throws_js(TypeError, () => new Blob([], {endings: value}), - 'Blob constructor should throw'); + 'Blob constructor should throw'); }, `Invalid "endings" value: ${JSON.stringify(value)}`)); test(t => { diff --git a/FileAPI/blob/Blob-constructor.html b/FileAPI/blob/Blob-constructor.html index d2b1777b86bed3..62a649aed66418 100644 --- a/FileAPI/blob/Blob-constructor.html +++ b/FileAPI/blob/Blob-constructor.html @@ -465,7 +465,7 @@ ].forEach(arg => { test(t => { assert_throws_js(TypeError, () => new Blob([], arg), - 'Blob constructor should throw with invalid property bag'); + 'Blob constructor should throw with invalid property bag'); }, `Passing ${JSON.stringify(arg)} for options should throw`); }); diff --git a/FileAPI/file/File-constructor-endings.html b/FileAPI/file/File-constructor-endings.html index f76d33295218c5..1282b6c5ac2c79 100644 --- a/FileAPI/file/File-constructor-endings.html +++ b/FileAPI/file/File-constructor-endings.html @@ -37,7 +37,7 @@ {} ].forEach(value => test(t => { assert_throws_js(TypeError, () => new File([], "name", {endings: value}), - 'File constructor should throw'); + 'File constructor should throw'); }, `Invalid "endings" value: ${JSON.stringify(value)}`)); test(t => { diff --git a/FileAPI/file/File-constructor.html b/FileAPI/file/File-constructor.html index 60dbb233f018f0..63fda5e8d17d0f 100644 --- a/FileAPI/file/File-constructor.html +++ b/FileAPI/file/File-constructor.html @@ -15,9 +15,9 @@ test(t => { assert_throws_js(TypeError, () => new File(), - 'Bits argument is required'); + 'Bits argument is required'); assert_throws_js(TypeError, () => new File([]), - 'Name argument is required'); + 'Name argument is required'); }, 'Required arguments'); function test_first_argument(arg1, expectedSize, testName) { @@ -65,13 +65,13 @@ ].forEach(arg => { test(t => { assert_throws_js(TypeError, () => new File(arg, 'world.html'), - 'Constructor should throw for invalid bits argument'); + 'Constructor should throw for invalid bits argument'); }, `Invalid bits argument: ${JSON.stringify(arg)}`); }); test(t => { assert_throws_js(Error, () => new File([to_string_throws], 'name.txt'), - 'Constructor should propagate exceptions'); + 'Constructor should propagate exceptions'); }, 'Bits argument: object that throws'); @@ -132,7 +132,7 @@ ].forEach(arg => { test(t => { assert_throws_js(TypeError, () => new File(['bits'], 'name.txt', arg), - 'Constructor should throw for invalid property bag type'); + 'Constructor should throw for invalid property bag type'); }, `Invalid property bag: ${JSON.stringify(arg)}`); }); @@ -151,8 +151,8 @@ test(t => { assert_throws_js(Error, - () => new File(['bits'], 'name.txt', {type: to_string_throws}), - 'Constructor should propagate exceptions'); + () => new File(['bits'], 'name.txt', {type: to_string_throws}), + 'Constructor should propagate exceptions'); }, 'Property bag propagates exceptions'); diff --git a/css/cssom/getComputedStyle-pseudo.html b/css/cssom/getComputedStyle-pseudo.html index 1795bcf2ba4080..3f8b7a72bdc28b 100644 --- a/css/cssom/getComputedStyle-pseudo.html +++ b/css/cssom/getComputedStyle-pseudo.html @@ -139,6 +139,6 @@ test(function() { var div = document.getElementById('test'); assert_throws_js(TypeError, () => getComputedStyle(div, "totallynotapseudo"), - "getComputedStyle with an unknown pseudo-element throws"); + "getComputedStyle with an unknown pseudo-element throws"); }, "Unknown pseudo-elements throw"); diff --git a/dom/events/Event-constructors.html b/dom/events/Event-constructors.html index 72347efd5324ad..87d68d5ef527fd 100644 --- a/dom/events/Event-constructors.html +++ b/dom/events/Event-constructors.html @@ -47,7 +47,7 @@ }) test(function() { assert_throws_js(TypeError, function() { Event("test") }, - 'Calling Event constructor without "new" must throw'); + 'Calling Event constructor without "new" must throw'); }) test(function() { var ev = new Event("I am an event", { bubbles: true, cancelable: false}) diff --git a/encoding/streams/decode-attributes.any.js b/encoding/streams/decode-attributes.any.js index 3fe442bf133c74..6552a91c6e281a 100644 --- a/encoding/streams/decode-attributes.any.js +++ b/encoding/streams/decode-attributes.any.js @@ -47,7 +47,7 @@ for (const trueValue of [true, 1, {}, [], 'yes']) { test(() => { assert_throws_js(RangeError, () => new TextDecoderStream(''), - 'the constructor should throw'); + 'the constructor should throw'); }, 'constructing with an invalid encoding should throw'); test(() => { @@ -58,14 +58,14 @@ test(() => { test(() => { assert_throws_js(Error, - () => new TextDecoderStream('utf-8', { - get fatal() { throw new Error(); } - }), 'the constructor should throw'); + () => new TextDecoderStream('utf-8', { + get fatal() { throw new Error(); } + }), 'the constructor should throw'); }, 'a throwing fatal member should cause the constructor to throw'); test(() => { assert_throws_js(Error, - () => new TextDecoderStream('utf-8', { - get ignoreBOM() { throw new Error(); } - }), 'the constructor should throw'); + () => new TextDecoderStream('utf-8', { + get ignoreBOM() { throw new Error(); } + }), 'the constructor should throw'); }, 'a throwing ignoreBOM member should cause the constructor to throw'); diff --git a/fetch/api/headers/headers-record.html b/fetch/api/headers/headers-record.html index 0a217c3ddb287f..c7d8d99a7095eb 100644 --- a/fetch/api/headers/headers-record.html +++ b/fetch/api/headers/headers-record.html @@ -257,7 +257,7 @@ // Returning duplicate keys from ownKeys() throws a TypeError. assert_throws_js(TypeError, - function() { var h = new Headers(proxy); }); + function() { var h = new Headers(proxy); }); assert_equals(log.length, 2); // The first thing is the [[Get]] of Symbol.iterator to figure out whether @@ -280,7 +280,7 @@ c: "d" }; var proxy = new Proxy(record, loggingHandler); assert_throws_js(TypeError, - function() { var h = new Headers(proxy); }); + function() { var h = new Headers(proxy); }); assert_equals(log.length, 7); // The first thing is the [[Get]] of Symbol.iterator to figure out whether diff --git a/generic-sensor/generic-sensor-tests.js b/generic-sensor/generic-sensor-tests.js index 0cb3cb224a187d..1843734a3bb0ad 100644 --- a/generic-sensor/generic-sensor-tests.js +++ b/generic-sensor/generic-sensor-tests.js @@ -487,8 +487,8 @@ function runGenericSensorTests(sensorName, ]; invalidFreqs.map(freq => { assert_throws_js(TypeError, - () => { new sensorType({frequency: freq}) }, - `when freq is ${freq}`); + () => { new sensorType({frequency: freq}) }, + `when freq is ${freq}`); }); }, `${sensorName}: throw 'TypeError' if frequency is invalid.`); @@ -539,8 +539,8 @@ function runGenericSensorTests(sensorName, ]; invalidRefFrames.map(refFrame => { assert_throws_js(TypeError, - () => { new sensorType({referenceFrame: refFrame}) }, - `when refFrame is ${refFrame}`); + () => { new sensorType({referenceFrame: refFrame}) }, + `when refFrame is ${refFrame}`); }); }, `${sensorName}: throw 'TypeError' if referenceFrame is not one of\ enumeration values.`); diff --git a/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html b/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html index 888750721281df..916527909173fd 100644 --- a/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html +++ b/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html @@ -17,10 +17,10 @@ // No promise is passed. assert_throws_js(TypeError, - function() { - new PromiseRejectionEvent('eventType', { bubbles: false }); - }, - 'Cannot construct PromiseRejectionEventInit without promise'); + function() { + new PromiseRejectionEvent('eventType', { bubbles: false }); + }, + 'Cannot construct PromiseRejectionEventInit without promise'); // bubbles is passed. assert_equals(new PromiseRejectionEvent('eventType', { bubbles: false, promise: p }).bubbles, false); diff --git a/mediacapture-image/ImageCapture-creation.https.html b/mediacapture-image/ImageCapture-creation.https.html index e53915608f00df..9828db15ec40ad 100644 --- a/mediacapture-image/ImageCapture-creation.https.html +++ b/mediacapture-image/ImageCapture-creation.https.html @@ -83,12 +83,12 @@ true ]; assert_throws_js(TypeError, - function() { var capturer = new ImageCapture(); }, - 'an ImageCapturer can not be created with no parameter'); + function() { var capturer = new ImageCapture(); }, + 'an ImageCapturer cannot be created with no parameter'); invalidParameters.map(parameter => { assert_throws_js(TypeError, - function() { var capturer = new ImageCapture(parameter); }, - `an ImageCapturer can not be created with a ${parameter} parameter`); + function() { var capturer = new ImageCapture(parameter); }, + `an ImageCapturer cannot be created with a ${parameter} parameter`); }); }, 'throw "TypeError" if parameter is not MediaStreamTrack.'); diff --git a/streams/piping/pipe-through.any.js b/streams/piping/pipe-through.any.js index e6959b6c12ae9b..71d75b03504e52 100644 --- a/streams/piping/pipe-through.any.js +++ b/streams/piping/pipe-through.any.js @@ -100,8 +100,8 @@ const badReadables = [null, undefined, 0, NaN, true, 'ReadableStream', Object.cr for (const readable of badReadables) { test(() => { assert_throws_js(TypeError, - ReadableStream.prototype.pipeThrough.bind(readable, uninterestingReadableWritablePair()), - 'pipeThrough should throw'); + ReadableStream.prototype.pipeThrough.bind(readable, uninterestingReadableWritablePair()), + 'pipeThrough should throw'); }, `pipeThrough should brand-check this and not allow '${readable}'`); test(() => { @@ -176,7 +176,7 @@ for (const signal of badSignals) { test(() => { const rs = new ReadableStream(); assert_throws_js(TypeError, () => rs.pipeThrough(uninterestingReadableWritablePair(), { signal }), - 'pipeThrough should throw'); + 'pipeThrough should throw'); }, `invalid values of signal should throw; specifically '${signal}'`); } @@ -191,7 +191,7 @@ test(() => { const rs = new ReadableStream(); rs.getReader(); assert_throws_js(TypeError, () => rs.pipeThrough(uninterestingReadableWritablePair()), - 'pipeThrough should throw'); + 'pipeThrough should throw'); }, 'pipeThrough should throw if this is locked'); test(() => { @@ -200,7 +200,7 @@ test(() => { const readable = new ReadableStream(); writable.getWriter(); assert_throws_js(TypeError, () => rs.pipeThrough({writable, readable}), - 'pipeThrough should throw'); + 'pipeThrough should throw'); }, 'pipeThrough should throw if writable is locked'); test(() => { diff --git a/streams/readable-byte-streams/brand-checks.any.js b/streams/readable-byte-streams/brand-checks.any.js index 9bbe7111ea8ddf..bed4ec411ec226 100644 --- a/streams/readable-byte-streams/brand-checks.any.js +++ b/streams/readable-byte-streams/brand-checks.any.js @@ -107,14 +107,14 @@ test(() => { test(() => { assert_throws_js(TypeError, () => new ReadableByteStreamController(fakeRS()), - 'Constructing a ReadableByteStreamController should throw'); + 'Constructing a ReadableByteStreamController should throw'); }, 'ReadableByteStreamController enforces a brand check on its arguments'); test(() => { assert_throws_js(TypeError, () => new ReadableByteStreamController(realRS()), - 'Constructing a ReadableByteStreamController should throw'); + 'Constructing a ReadableByteStreamController should throw'); }, 'ReadableByteStreamController can\'t be given a fully-constructed ReadableStream'); @@ -175,7 +175,7 @@ promise_test(t => { function brandChecks() { for (const badController of [fakeRBSController(), realRS(), realRSBYOBReader(), undefined, null]) { assert_throws_js(TypeError, () => new ReadableStreamBYOBRequest(badController, new Uint8Array(1)), - 'ReadableStreamBYOBRequest constructor must throw for an invalid controller argument'); + 'ReadableStreamBYOBRequest constructor must throw for an invalid controller argument'); } getterThrowsForAll(ReadableStreamBYOBRequest.prototype, 'view', [fakeRSBYOBRequest(), realRS(), realRSBYOBReader(), realRBSController(), undefined, null]); diff --git a/streams/readable-byte-streams/construct-byob-request.any.js b/streams/readable-byte-streams/construct-byob-request.any.js index 2e1c53fdea8779..516025135b07d6 100644 --- a/streams/readable-byte-streams/construct-byob-request.any.js +++ b/streams/readable-byte-streams/construct-byob-request.any.js @@ -49,7 +49,7 @@ function runTests(ReadableStreamBYOBRequest) { const view = createDummyObject(Uint8Array.prototype, viewType, () => new Uint8Array(16)); test(() => { assert_throws_js(TypeError, () => new ReadableStreamBYOBRequest(controller, view), - 'constructor should throw'); + 'constructor should throw'); }, `ReadableStreamBYOBRequest constructor should throw when passed a ${controllerType} ` + `ReadableByteStreamController and a ${viewType} view`); } diff --git a/streams/readable-byte-streams/general.any.js b/streams/readable-byte-streams/general.any.js index 1947ededb6652e..e4951c0c819409 100644 --- a/streams/readable-byte-streams/general.any.js +++ b/streams/readable-byte-streams/general.any.js @@ -1990,7 +1990,7 @@ promise_test(() => { const reader = rs.getReader({ mode: 'byob' }); return reader.read(newView()).then(() => { assert_throws_js(TypeError, () => byobRequest.respondWithNewView(newView()), - 'respondWithNewView() should throw a TypeError'); + 'respondWithNewView() should throw a TypeError'); }); }, 'calling respondWithNewView() twice on the same byobRequest should throw'); @@ -2102,20 +2102,20 @@ test(() => { }), 'constructor should throw for size function'); assert_throws_js(RangeError, () => new ReadableStream({ type: 'bytes' }, { size: null }), - 'constructor should throw for size defined'); + 'constructor should throw for size defined'); assert_throws_js(RangeError, - () => new ReadableStream({ type: 'bytes' }, new CountQueuingStrategy({ highWaterMark: 1 })), - 'constructor should throw when strategy is CountQueuingStrategy'); + () => new ReadableStream({ type: 'bytes' }, new CountQueuingStrategy({ highWaterMark: 1 })), + 'constructor should throw when strategy is CountQueuingStrategy'); assert_throws_js(RangeError, - () => new ReadableStream({ type: 'bytes' }, new ByteLengthQueuingStrategy({ highWaterMark: 512 })), - 'constructor should throw when strategy is ByteLengthQueuingStrategy'); + () => new ReadableStream({ type: 'bytes' }, new ByteLengthQueuingStrategy({ highWaterMark: 512 })), + 'constructor should throw when strategy is ByteLengthQueuingStrategy'); class HasSizeMethod { size() {} } assert_throws_js(RangeError, () => new ReadableStream({ type: 'bytes' }, new HasSizeMethod()), - 'constructor should throw when size on the prototype chain'); + 'constructor should throw when size on the prototype chain'); }, 'ReadableStream constructor should not accept a strategy with a size defined if type is "bytes"'); diff --git a/streams/readable-streams/brand-checks.any.js b/streams/readable-streams/brand-checks.any.js index c82f513df01a86..564eea016bd7fb 100644 --- a/streams/readable-streams/brand-checks.any.js +++ b/streams/readable-streams/brand-checks.any.js @@ -120,7 +120,7 @@ test(() => { test(() => { assert_throws_js(TypeError, () => new ReadableStreamDefaultReader(fakeRS()), - 'Constructing a ReadableStreamDefaultReader should throw'); + 'Constructing a ReadableStreamDefaultReader should throw'); }, 'ReadableStreamDefaultReader enforces a brand check on its argument'); @@ -155,14 +155,14 @@ test(() => { test(() => { assert_throws_js(TypeError, () => new ReadableStreamDefaultController(fakeRS()), - 'Constructing a ReadableStreamDefaultController should throw'); + 'Constructing a ReadableStreamDefaultController should throw'); }, 'ReadableStreamDefaultController enforces a brand check on its argument'); test(() => { assert_throws_js(TypeError, () => new ReadableStreamDefaultController(realRS()), - 'Constructing a ReadableStreamDefaultController should throw'); + 'Constructing a ReadableStreamDefaultController should throw'); }, 'ReadableStreamDefaultController can\'t be given a fully-constructed ReadableStream'); diff --git a/streams/readable-streams/default-reader.any.js b/streams/readable-streams/default-reader.any.js index 1e67b272b544ed..bf807f76686b17 100644 --- a/streams/readable-streams/default-reader.any.js +++ b/streams/readable-streams/default-reader.any.js @@ -69,7 +69,7 @@ test(() => { const rs = new ReadableStream(); new ReadableStreamDefaultReader(rs); // Constructing directly the first time should be fine. assert_throws_js(TypeError, () => new ReadableStreamDefaultReader(rs), - 'constructing directly the second time should fail'); + 'constructing directly the second time should fail'); }, 'Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct ' + 'construction)'); diff --git a/streams/resources/test-utils.js b/streams/resources/test-utils.js index 614fcca18e96de..ff5c0151c1c877 100644 --- a/streams/resources/test-utils.js +++ b/streams/resources/test-utils.js @@ -44,7 +44,7 @@ self.methodThrowsForAll = (obj, methodName, targets, args) => { self.constructorThrowsForAll = (constructor, firstArgs) => { firstArgs.forEach(firstArg => assert_throws_js(TypeError, () => new constructor(firstArg), - 'constructor should throw a TypeError')); + 'constructor should throw a TypeError')); }; self.garbageCollect = () => { diff --git a/streams/transform-streams/strategies.any.js b/streams/transform-streams/strategies.any.js index c7645e7e651c0b..c29c6cb59d8570 100644 --- a/streams/transform-streams/strategies.any.js +++ b/streams/transform-streams/strategies.any.js @@ -87,13 +87,13 @@ promise_test(t => { test(() => { assert_throws_js(RangeError, () => new TransformStream(undefined, { highWaterMark: -1 }), - 'should throw RangeError for negative writableHighWaterMark'); + 'should throw RangeError for negative writableHighWaterMark'); assert_throws_js(RangeError, () => new TransformStream(undefined, undefined, { highWaterMark: -1 }), - 'should throw RangeError for negative readableHighWaterMark'); + 'should throw RangeError for negative readableHighWaterMark'); assert_throws_js(RangeError, () => new TransformStream(undefined, { highWaterMark: NaN }), - 'should throw RangeError for NaN writableHighWaterMark'); + 'should throw RangeError for NaN writableHighWaterMark'); assert_throws_js(RangeError, () => new TransformStream(undefined, undefined, { highWaterMark: NaN }), - 'should throw RangeError for NaN readableHighWaterMark'); + 'should throw RangeError for NaN readableHighWaterMark'); }, 'a RangeError should be thrown for an invalid highWaterMark'); const objectThatConvertsTo42 = { diff --git a/streams/writable-streams/constructor.any.js b/streams/writable-streams/constructor.any.js index c792e1f1fafe35..ac0483e61f08cc 100644 --- a/streams/writable-streams/constructor.any.js +++ b/streams/writable-streams/constructor.any.js @@ -116,7 +116,7 @@ test(() => { }); assert_throws_js(TypeError, () => new WritableStreamDefaultController({}), - 'constructor should throw a TypeError exception'); + 'constructor should throw a TypeError exception'); }, 'WritableStreamDefaultController constructor should throw'); test(() => { @@ -128,7 +128,7 @@ test(() => { }); assert_throws_js(TypeError, () => new WritableStreamDefaultController(stream), - 'constructor should throw a TypeError exception'); + 'constructor should throw a TypeError exception'); }, 'WritableStreamDefaultController constructor should throw when passed an initialised WritableStream'); test(() => { @@ -137,7 +137,7 @@ test(() => { const WritableStreamDefaultWriter = writer.constructor; writer.releaseLock(); assert_throws_js(TypeError, () => new WritableStreamDefaultWriter({}), - 'constructor should throw a TypeError exception'); + 'constructor should throw a TypeError exception'); }, 'WritableStreamDefaultWriter should throw unless passed a WritableStream'); test(() => { @@ -145,7 +145,7 @@ test(() => { const writer = stream.getWriter(); const WritableStreamDefaultWriter = writer.constructor; assert_throws_js(TypeError, () => new WritableStreamDefaultWriter(stream), - 'constructor should throw a TypeError exception'); + 'constructor should throw a TypeError exception'); }, 'WritableStreamDefaultWriter constructor should throw when stream argument is locked'); const operations = [ diff --git a/streams/writable-streams/write.any.js b/streams/writable-streams/write.any.js index 68da7939855566..f60434b9fc13e2 100644 --- a/streams/writable-streams/write.any.js +++ b/streams/writable-streams/write.any.js @@ -257,7 +257,7 @@ promise_test(() => { const writer = stream.getWriter(); const WritableStreamDefaultWriter = writer.constructor; assert_throws_js(TypeError, () => new WritableStreamDefaultWriter(stream), - 'should not be able to construct on locked stream'); + 'should not be able to construct on locked stream'); // If stream.[[writer]] no longer points to |writer| then the closed Promise // won't work properly. return Promise.all([writer.close(), writer.closed]); diff --git a/trusted-types/trusted-types-createHTMLDocument.tentative.html b/trusted-types/trusted-types-createHTMLDocument.tentative.html index ac95d9e64de97d..440d2a88b9367d 100644 --- a/trusted-types/trusted-types-createHTMLDocument.tentative.html +++ b/trusted-types/trusted-types-createHTMLDocument.tentative.html @@ -36,7 +36,7 @@ for (let doc_type in doc_types) { doc_test(doc_type, doc => { assert_throws_js(TypeError, - _ => { doc.createElement("script").textContent = "2+2"; }); + _ => { doc.createElement("script").textContent = "2+2"; }); }, "Trusted Type assignment is blocked." ); doc_test(doc_type, doc => { @@ -45,7 +45,7 @@ doc.body.innerHTML = value; assert_equals(doc.body.textContent, "hello"); assert_throws_js(TypeError, - _ => { doc.body.innerHTML = "world"; }); + _ => { doc.body.innerHTML = "world"; }); }, "Trusted Type instances created in the main doc can be used."); } diff --git a/trusted-types/trusted-types-duplicate-names-list.tentative.html b/trusted-types/trusted-types-duplicate-names-list.tentative.html index 9a895ffa2ad2b1..afb2f5f7c4b7f6 100644 --- a/trusted-types/trusted-types-duplicate-names-list.tentative.html +++ b/trusted-types/trusted-types-duplicate-names-list.tentative.html @@ -9,14 +9,14 @@ test(t => { trustedTypes.createPolicy("a", {}), assert_throws_js(TypeError, - _ => trustedTypes.createPolicy("a", {}), - "Duplicate name"); + _ => trustedTypes.createPolicy("a", {}), + "Duplicate name"); trustedTypes.createPolicy("b", {}), assert_throws_js(TypeError, - _ => trustedTypes.createPolicy("d", {}), - "Invalid name."); + _ => trustedTypes.createPolicy("d", {}), + "Invalid name."); }, "TrustedTypePolicyFactory and policy list in CSP."); diff --git a/trusted-types/trusted-types-duplicate-names.tentative.html b/trusted-types/trusted-types-duplicate-names.tentative.html index e817cf145a260b..decce5356467f9 100644 --- a/trusted-types/trusted-types-duplicate-names.tentative.html +++ b/trusted-types/trusted-types-duplicate-names.tentative.html @@ -19,7 +19,7 @@ let def = trustedTypes.createPolicy("default", {}); assert_throws_js(TypeError, - _ => trustedTypes.createPolicy("default", {})); + _ => trustedTypes.createPolicy("default", {})); }, "policy - duplicate names"); diff --git a/trusted-types/trusted-types-eval-reporting.tentative.https.html b/trusted-types/trusted-types-eval-reporting.tentative.https.html index 90007168a13d1d..d98b457f6aaa7f 100644 --- a/trusted-types/trusted-types-eval-reporting.tentative.https.html +++ b/trusted-types/trusted-types-eval-reporting.tentative.https.html @@ -71,7 +71,7 @@ .then(promise_violation("require-trusted-types-for 'script'")) .then(promise_flush()); assert_throws_js(EvalError, - _ => eval('beacon="should not run"')); + _ => eval('beacon="should not run"')); assert_equals(beacon, 'never_overwritten'); flush(); return p; diff --git a/wasm/jsapi/constructor/validate.any.js b/wasm/jsapi/constructor/validate.any.js index a0eaa3fb87d624..a523acc7925c9e 100644 --- a/wasm/jsapi/constructor/validate.any.js +++ b/wasm/jsapi/constructor/validate.any.js @@ -25,7 +25,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => WebAssembly.validate(argument), - `validate(${format_value(argument)})`); + `validate(${format_value(argument)})`); } }, "Invalid arguments"); diff --git a/wasm/jsapi/global/constructor.any.js b/wasm/jsapi/global/constructor.any.js index cb287da4e9afa1..270149ec144304 100644 --- a/wasm/jsapi/global/constructor.any.js +++ b/wasm/jsapi/global/constructor.any.js @@ -74,8 +74,8 @@ test(() => { ]; for (const invalidArgument of invalidArguments) { assert_throws_js(TypeError, - () => new WebAssembly.Global(invalidArgument), - `new Global(${format_value(invalidArgument)})`); + () => new WebAssembly.Global(invalidArgument), + `new Global(${format_value(invalidArgument)})`); } }, "Invalid descriptor argument"); diff --git a/wasm/jsapi/instance/constructor.any.js b/wasm/jsapi/instance/constructor.any.js index 745c3f8495123b..06c6d7a88c0923 100644 --- a/wasm/jsapi/instance/constructor.any.js +++ b/wasm/jsapi/instance/constructor.any.js @@ -34,7 +34,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => new WebAssembly.Instance(argument), - `new Instance(${format_value(argument)})`); + `new Instance(${format_value(argument)})`); } }, "Non-Module arguments"); diff --git a/wasm/jsapi/memory/constructor.any.js b/wasm/jsapi/memory/constructor.any.js index 8bd606e321283a..03eed5270831b5 100644 --- a/wasm/jsapi/memory/constructor.any.js +++ b/wasm/jsapi/memory/constructor.any.js @@ -54,8 +54,8 @@ test(() => { ]; for (const invalidArgument of invalidArguments) { assert_throws_js(TypeError, - () => new WebAssembly.Memory(invalidArgument), - `new Memory(${format_value(invalidArgument)})`); + () => new WebAssembly.Memory(invalidArgument), + `new Memory(${format_value(invalidArgument)})`); } }, "Invalid descriptor argument"); diff --git a/wasm/jsapi/module/constructor.any.js b/wasm/jsapi/module/constructor.any.js index 1fffb6cd4f3b90..b6f03c73b5d048 100644 --- a/wasm/jsapi/module/constructor.any.js +++ b/wasm/jsapi/module/constructor.any.js @@ -39,7 +39,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => new WebAssembly.Module(argument), - `new Module(${format_value(argument)})`); + `new Module(${format_value(argument)})`); } }, "Invalid arguments"); diff --git a/wasm/jsapi/module/customSections.any.js b/wasm/jsapi/module/customSections.any.js index 298d89604cf739..8c215d17bd2583 100644 --- a/wasm/jsapi/module/customSections.any.js +++ b/wasm/jsapi/module/customSections.any.js @@ -43,7 +43,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => WebAssembly.Module.customSections(argument, ""), - `customSections(${format_value(argument)})`); + `customSections(${format_value(argument)})`); } }, "Non-Module arguments"); diff --git a/wasm/jsapi/module/exports.any.js b/wasm/jsapi/module/exports.any.js index 83f97dd67a1e41..1329c6a6021f2d 100644 --- a/wasm/jsapi/module/exports.any.js +++ b/wasm/jsapi/module/exports.any.js @@ -52,7 +52,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => WebAssembly.Module.exports(argument), - `exports(${format_value(argument)})`); + `exports(${format_value(argument)})`); } }, "Non-Module arguments"); diff --git a/wasm/jsapi/module/imports.any.js b/wasm/jsapi/module/imports.any.js index 91e4be33aca695..9a7d6115986ea0 100644 --- a/wasm/jsapi/module/imports.any.js +++ b/wasm/jsapi/module/imports.any.js @@ -58,7 +58,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => WebAssembly.Module.imports(argument), - `imports(${format_value(argument)})`); + `imports(${format_value(argument)})`); } }, "Non-Module arguments"); diff --git a/wasm/jsapi/table/assertions.js b/wasm/jsapi/table/assertions.js index c42a446a75d01f..b1aeaf1a65dab7 100644 --- a/wasm/jsapi/table/assertions.js +++ b/wasm/jsapi/table/assertions.js @@ -7,7 +7,7 @@ function assert_equal_to_array(table, expected, message) { assert_equals(table.get(i), expected[i], `${message}: table.get(${i} of ${expected.length})`); } assert_throws_js(RangeError, () => table.get(expected.length), - `${message}: table.get(${expected.length} of ${expected.length})`); + `${message}: table.get(${expected.length} of ${expected.length})`); assert_throws_js(RangeError, () => table.get(expected.length + 1), - `${message}: table.get(${expected.length + 1} of ${expected.length})`); + `${message}: table.get(${expected.length + 1} of ${expected.length})`); } diff --git a/wasm/jsapi/table/constructor.any.js b/wasm/jsapi/table/constructor.any.js index a494a9e559b921..5c9a6f13d91eba 100644 --- a/wasm/jsapi/table/constructor.any.js +++ b/wasm/jsapi/table/constructor.any.js @@ -48,8 +48,8 @@ test(() => { ]; for (const invalidArgument of invalidArguments) { assert_throws_js(TypeError, - () => new WebAssembly.Table(invalidArgument), - `new Table(${format_value(invalidArgument)})`); + () => new WebAssembly.Table(invalidArgument), + `new Table(${format_value(invalidArgument)})`); } }, "Invalid descriptor argument"); diff --git a/wasm/jsapi/table/get-set.any.js b/wasm/jsapi/table/get-set.any.js index 175f30fbcadca6..4e0a5f8c1048f4 100644 --- a/wasm/jsapi/table/get-set.any.js +++ b/wasm/jsapi/table/get-set.any.js @@ -150,7 +150,7 @@ test(() => { ]; for (const argument of invalidArguments) { assert_throws_js(TypeError, () => table.set(0, argument), - `set(${format_value(argument)})`); + `set(${format_value(argument)})`); } assert_equal_to_array(table, [null]); }, "Setting non-function"); diff --git a/webmessaging/with-ports/027.html b/webmessaging/with-ports/027.html index 78ea225eb75577..715835125811b1 100644 --- a/webmessaging/with-ports/027.html +++ b/webmessaging/with-ports/027.html @@ -19,8 +19,8 @@ channel[1] = channel.port2; channel.length = 2; assert_throws_js(TypeError, - () => { postMessage('', '*', channel) }, - 'Old-style WebIDL arrays must throw a type error'); + () => { postMessage('', '*', channel) }, + 'Old-style WebIDL arrays must throw a type error'); }, "Old-style array objects"); diff --git a/websockets/stream-tentative/close.any.js b/websockets/stream-tentative/close.any.js index 1442d821148119..31febe9d9fdec9 100644 --- a/websockets/stream-tentative/close.any.js +++ b/websockets/stream-tentative/close.any.js @@ -51,7 +51,7 @@ promise_test(async () => { const wss = new WebSocketStream(ECHOURL); await wss.connection; assert_throws_js(TypeError, () => wss.close(true), - 'close should throw a TypeError'); + 'close should throw a TypeError'); }, 'close(true) should throw a TypeError'); promise_test(async () => { @@ -59,7 +59,7 @@ promise_test(async () => { await wss.connection; const reason = '.'.repeat(124); assert_throws_dom('SyntaxError', () => wss.close({ reason }), - 'close should throw a TypeError'); + 'close should throw a TypeError'); }, 'close() with an overlong reason should throw'); promise_test(t => { @@ -77,7 +77,7 @@ for (const invalidCode of [999, 1001, 2999, 5000]) { const wss = new WebSocketStream(ECHOURL); await wss.connection; assert_throws_dom('InvalidAccessError', () => wss.close({ code: invalidCode }), - 'close should throw a TypeError'); + 'close should throw a TypeError'); }, `close() with invalid code ${invalidCode} should throw`); } diff --git a/workers/SharedWorker-constructor.html b/workers/SharedWorker-constructor.html index 5347891d41855a..6298dd934e11d8 100644 --- a/workers/SharedWorker-constructor.html +++ b/workers/SharedWorker-constructor.html @@ -6,23 +6,23 @@ test(() => { assert_throws_js(Error, - function() { - new SharedWorker({toString:function(){throw new Error()}}, "name") }, - "toString exception not propagagted"); + function() { + new SharedWorker({toString:function(){throw new Error()}}, "name") }, + "toString exception not propagated"); }, "Test toString exception propagated correctly."); test(() => { assert_throws_js(RangeError, - function() { - var foo = {toString:function(){new Worker(foo)}} - new SharedWorker(foo, name); }, - "Trying to create workers recursively did not result in an exception."); + function() { + var foo = {toString:function(){new Worker(foo)}} + new SharedWorker(foo, name); }, + "Trying to create workers recursively did not result in an exception."); }, "Test recursive worker creation results in exception."); test(() => { assert_throws_js(TypeError, - function() { new SharedWorker(); }, - "Invoking SharedWorker constructor without arguments did not result in an exception."); + function() { new SharedWorker(); }, + "Invoking SharedWorker constructor without arguments did not result in an exception."); }, "Test SharedWorker creation without arguments results in exception."); test(() => { diff --git a/workers/Worker-multi-port.html b/workers/Worker-multi-port.html index 725745b0ea4498..c34524503be33c 100644 --- a/workers/Worker-multi-port.html +++ b/workers/Worker-multi-port.html @@ -39,18 +39,18 @@ test(() => { var worker = new Worker("support/Worker-thread-multi-port.js"); assert_throws_js(TypeError, - function() { worker.postMessage(); }, - 'Empty postMessage should throw exception.'); + function() { worker.postMessage(); }, + 'Empty postMessage should throw exception.'); }, 'Test empty postMessage throws exception.'); test(() => { var worker = new Worker("support/Worker-thread-multi-port.js"); var channel = new MessageChannel(); assert_throws_js(TypeError, - function() { worker.postMessage("null port", - [channel.port1, null, - channel.port2]); }, - 'postMessage with null ports should throw exception.'); + function() { worker.postMessage("null port", + [channel.port1, null, + channel.port2]); }, + 'postMessage with null ports should throw exception.'); }, 'Test postMessage with null ports throws exception.'); test(() => { diff --git a/workers/constructors/Worker/Worker-constructor.html b/workers/constructors/Worker/Worker-constructor.html index 524a0982a9e532..6d6843b77b69be 100644 --- a/workers/constructors/Worker/Worker-constructor.html +++ b/workers/constructors/Worker/Worker-constructor.html @@ -6,9 +6,9 @@ test(() => { assert_throws_js(Error, - function() { - new Worker({toString:function(){throw new Error()}})}, - 'toString exception should be propagated'); + function() { + new Worker({toString:function(){throw new Error()}})}, + 'toString exception should be propagated'); }, 'Test toString propagation exception.'); test(() => { @@ -23,9 +23,9 @@ test(() => { assert_throws_js(TypeError, - function() { new Worker(); }, - 'invoking Worker constructor without arguments should result' + - 'in an exception.') + function() { new Worker(); }, + 'invoking Worker constructor without arguments should result ' + + 'in an exception.') }, 'Test worker creation with no arguments'); async_test(t => { @@ -38,9 +38,9 @@ test(() => { assert_throws_dom("SyntaxError", - function() { var worker = new Worker('http://invalid:123$'); }, - 'Invoking Worker constructor with invalid script URL should' + - 'result in an exception.'); + function() { var worker = new Worker('http://invalid:123$'); }, + 'Invoking Worker constructor with invalid script URL should ' + + 'result in an exception.'); }, 'Test invalid script URL.'); async_test(t => {