Skip to content

Commit

Permalink
test: restore wpt typos
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBaulch committed Oct 9, 2024
1 parent a8cc937 commit b7b3e45
Show file tree
Hide file tree
Showing 26 changed files with 44 additions and 44 deletions.
8 changes: 4 additions & 4 deletions test/fixtures/guess-hash-seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function time_set_lookup(set, value) {
// Set with 256 buckets; bucket 0 full, others empty
const tester_set_buckets = 256;
const tester_set = new Set();
let tester_set_threshold;
let tester_set_treshold;
(function() {
// fill bucket 0 and find extra numbers mapping to bucket 0 and a different
// bucket `capacity == numBuckets * 2`
Expand Down Expand Up @@ -114,9 +114,9 @@ let tester_set_threshold;
const neg_time =
Math.min(...run_repeated(10000, time_set_lookup.bind(null, tester_set,
negative_test_value)));
tester_set_threshold = (pos_time + neg_time) / 2;
tester_set_treshold = (pos_time + neg_time) / 2;
// console.log(`pos_time: ${pos_time}, neg_time: ${neg_time},`,
// `threshold: ${tester_set_threshold}`);
// `threshold: ${tester_set_treshold}`);
})();

// determine hash seed
Expand All @@ -126,7 +126,7 @@ const slow_str_gen = (function*() {
while (1) {
const str = `#${strgen_i++}`;
for (let i = 0; i < 1000; i++) {
if (time_set_lookup(tester_set, str) < tester_set_threshold)
if (time_set_lookup(tester_set, str) < tester_set_treshold)
continue outer;
}
yield str;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/FileAPI/BlobURL/test2-manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

xhr.send();

}, 'Check whether the browser response 500 in XHR if the selected file which File/Blob URL referred is not found');
}, 'Check whether the browser response 500 in XHR if the selected file which File/Blob URL refered is not found');

done();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// META: title=FileAPI Test: Blob Determining Encoding

var t = async_test("Blob Determining Encoding with encoding argument");
var t = async_test("Blob Determing Encoding with encoding argument");
t.step(function() {
// string 'hello'
var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
Expand All @@ -14,7 +14,7 @@ t.step(function() {
reader.readAsText(blob, "UTF-16BE");
});

var t = async_test("Blob Determining Encoding with type attribute");
var t = async_test("Blob Determing Encoding with type attribute");
t.step(function() {
var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
var blob = new Blob([new Uint8Array(data)], {type:"text/plain;charset=UTF-16BE"});
Expand All @@ -28,7 +28,7 @@ t.step(function() {
});


var t = async_test("Blob Determining Encoding with UTF-8 BOM");
var t = async_test("Blob Determing Encoding with UTF-8 BOM");
t.step(function() {
var data = [0xEF,0xBB,0xBF,0x68,0x65,0x6C,0x6C,0xC3,0xB6];
var blob = new Blob([new Uint8Array(data)]);
Expand All @@ -41,7 +41,7 @@ t.step(function() {
reader.readAsText(blob);
});

var t = async_test("Blob Determining Encoding without anything implying charset.");
var t = async_test("Blob Determing Encoding without anything implying charset.");
t.step(function() {
var data = [0x68,0x65,0x6C,0x6C,0xC3,0xB6];
var blob = new Blob([new Uint8Array(data)]);
Expand All @@ -54,7 +54,7 @@ t.step(function() {
reader.readAsText(blob);
});

var t = async_test("Blob Determining Encoding with UTF-16BE BOM");
var t = async_test("Blob Determing Encoding with UTF-16BE BOM");
t.step(function() {
var data = [0xFE,0xFF,0x00,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F];
var blob = new Blob([new Uint8Array(data)]);
Expand All @@ -67,7 +67,7 @@ t.step(function() {
reader.readAsText(blob);
});

var t = async_test("Blob Determining Encoding with UTF-16LE BOM");
var t = async_test("Blob Determing Encoding with UTF-16LE BOM");
t.step(function() {
var data = [0xFF,0xFE,0x68,0x00,0x65,0x00,0x6C,0x00,0x6C,0x00,0x6F,0x00];
var blob = new Blob([new Uint8Array(data)]);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/FileAPI/support/send-file-form-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const formPostFileUploadTest = ({

// Used to verify that the browser agrees with the test about
// field value replacement and encoding independently of file system
// idiosyncrasies.
// idiosyncracies.
form.append(Object.assign(document.createElement('input'), {
type: 'hidden',
name: 'filename',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const formDataPostFileUploadTest = ({

// Used to verify that the browser agrees with the test about
// field value replacement and encoding independently of file system
// idiosyncrasies.
// idiosyncracies.
formData.append("filename", fileBaseName);

// Same, but with name and value reversed to ensure field names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function run_test() {
isVerified = await subtle.verify(algorithm, publicKey, test.signature, test.message);
} catch (err) {
assert_true(publicKey !== undefined, "Public key should be valid.");
assert_unreached("The operation shouldn't fail, but it threw this error: " + err.name + ": " + err.message + ".");
assert_unreached("The operation shouldn't fail, but it thown this error: " + err.name + ": " + err.message + ".");
}
assert_equals(isVerified, test.verified, "Signature verification result.");
}, algorithmName + " Verification checks with small-order key of order - Test " + test.id);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/common/security-features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ Taking the spec JSON, the generator follows this algorithm:

* Expand all ```excluded_tests``` to create a denylist of selections

* For each `specification` entries: Expand the ```test_expansion``` pattern into selections and check each against the denylist, if not marked as suppressed, generate the test resources for the selection
* For each `specification` entries: Expand the ```test_expansion``` pattern into selections and check each against the denylist, if not marked as suppresed, generate the test resources for the selection

### SourceContext Resolution

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ for (let chunkSize = 1; chunkSize < 16; ++chunkSize) {
promise_test(async t => {
const decompressedData = await decompressArrayBuffer(compressedBytesWithDeflate, 'deflate', chunkSize);
assert_array_equals(decompressedData, expectedChunkValue, "value should match");
}, `decompressing split chunk into pieces of size ${chunkSize} should work in deflate`);
}, `decompressing splitted chunk into pieces of size ${chunkSize} should work in deflate`);

promise_test(async t => {
const decompressedData = await decompressArrayBuffer(compressedBytesWithGzip, 'gzip', chunkSize);
assert_array_equals(decompressedData, expectedChunkValue, "value should match");
}, `decompressing split chunk into pieces of size ${chunkSize} should work in gzip`);
}, `decompressing splitted chunk into pieces of size ${chunkSize} should work in gzip`);

promise_test(async t => {
const decompressedData = await decompressArrayBuffer(compressedBytesWithDeflateRaw, 'deflate-raw', chunkSize);
assert_array_equals(decompressedData, expectedChunkValue, "value should match");
}, `decompressing split chunk into pieces of size ${chunkSize} should work in deflate-raw`);
}, `decompressing splitted chunk into pieces of size ${chunkSize} should work in deflate-raw`);
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

function onOverscroll(event) {
assert_false(event.cancelable);
// overscroll events targeting document are bubbled to the window.
// overscroll events targetting document are bubbled to the window.
assert_true(event.bubbles);
window_received_overscroll = true;
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/dom/events/scrolling/scroll_support.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const MAX_UNCHANGED_FRAMES = 20;
function waitFor(condition, error_message = 'Reaches the maximum frames.') {
return new Promise((resolve, reject) => {
function tick(frames) {
// We requestAnimationFrame either for MAX_FRAME frames or until condition
// We requestAnimationFrame either for MAX_FRAM frames or until condition
// is met.
if (frames >= MAX_FRAME)
reject(error_message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>Description</h1>
<p>Test that a reused resource only appears in the buffer once.</p>
<script>
// Need our own image loading helper because the one in resource-loaders.js
// is designed to always side-step the HTTP cache but this test relies on the
// is desgined to always side-step the HTTP cache but this test relies on the
// second request being resolved from the cache.
const load_image = path => new Promise(resolve => {
const img = document.createElement('img');
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/resource-timing/initiator-type/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<script>
initiator_type_test("nested.css", "link", "<link>");

// Verify there are entries for each of nested.css' nested resources.
// Verify there are enries for each of nested.css' nested resources.
initiator_type_test("resource_timing_test0.css?id=n1", "css", "css resources embedded in css");
initiator_type_test("fonts/Ahem.ttf?id=n1", "css", "font resources embedded in css");
initiator_type_test("blue.png?id=n1", "css", "image resources embedded in css");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const connection_reuse_test = (path, follow_on_assertions, test_label) => {
invariants.assert_connection_reused(entry);
on_200(entry);
},
`PerformanceResourceTiming entries need to conform to the spec when a ` +
`PerformanceResrouceTiming entries need to conform to the spec when a ` +
`distinct resource is fetched over a persistent connection ` +
`(${test_label})`);

Expand All @@ -57,7 +57,7 @@ const connection_reuse_test = (path, follow_on_assertions, test_label) => {
invariants.assert_connection_reused(entry);
on_304(entry);
},
`PerformanceResourceTiming entries need to conform to the spec when the ` +
`PerformanceResrouceTiming entries need to conform to the spec when the ` +
`resource is cache-revalidated over a persistent connection ` +
`(${test_label})`);
}
2 changes: 1 addition & 1 deletion test/fixtures/wpt/resources/channel.sub.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
*
* @param {SendChannel|string} [dest] - Either a SendChannel
* to the destination, or the UUID of the destination. If
* omitted, a new UUID is generated, which can be used when
* ommitted, a new UUID is generated, which can be used when
* constructing the URL for the global.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/resources/idlharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ IdlArray.prototype.merge_partials = function()
{
// Special-case "Exposed". Must be a subset of original interface's exposure.
// Exposed on a partial is the equivalent of having the same Exposed on all nested members.
// See https://github.com/heycam/webidl/issues/154 for discrepancy between Exposed and
// See https://github.com/heycam/webidl/issues/154 for discrepency between Exposed and
// other extended attributes on partial interfaces.
const exposureAttr = parsed_idl.extAttrs.find(a => a.name === "Exposed");
if (exposureAttr) {
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/wpt/resources/testdriver-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* await actions.send();
*
* @param {number} [defaultTickDuration] - The default duration of a
* tick. Be default this is set to 16ms, which is one frame time
* tick. Be default this is set ot 16ms, which is one frame time
* based on 60Hz display.
*/
function Actions(defaultTickDuration=16) {
Expand Down Expand Up @@ -235,7 +235,7 @@
} while (sourceNames.has(name))
} else {
if (sourceNames.has(name)) {
throw new Error(`Already have a source of type ${type} named ${name}.`);
throw new Error(`Alreay have a source of type ${type} named ${name}.`);
}
}
this.sources.get(type).set(name, new (this.sourceTypes.get(type))(parameters));
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/wpt/resources/testharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@

/**
* @callback TestFunction
* @param {Test} test - The test currently being run.
* @param {Test} test - The test currnetly being run.
* @param {Any[]} args - Additional args to pass to function.
*
*/
Expand Down Expand Up @@ -852,7 +852,7 @@
promise = promiseOrConstructor;
description = descriptionOrPromise;
assert(maybeDescription === undefined,
"Too many args passed to no-constructor version of promise_rejects_dom");
"Too many args pased to no-constructor version of promise_rejects_dom");
}
return bring_promise_to_current_realm(promise)
.then(test.unreached_func("Should have rejected: " + description))
Expand Down Expand Up @@ -2151,7 +2151,7 @@
func = funcOrConstructor;
description = descriptionOrFunc;
assert(maybeDescription === undefined,
"Too many args passed to no-constructor version of assert_throws_dom");
"Too many args pased to no-constructor version of assert_throws_dom");
}
assert_throws_dom_impl(type, func, description, "assert_throws_dom", constructor)
}
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/wpt/resources/webidl2/lib/webidl2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async function transferMessagePortWith(constructor) {
await transferMessagePortWithOrder3(new constructor());
}

async function advancedTransferMessagePortWith(constructor) {
async function advancedTransferMesagePortWith(constructor) {
await transferMessagePortWithOrder4(new constructor());
await transferMessagePortWithOrder5(new constructor());
await transferMessagePortWithOrder6(new constructor());
Expand Down Expand Up @@ -166,7 +166,7 @@ async function mixedTransferMessagePortWithOrder3() {
);
}

async function mixedTransferMessagePortWith() {
async function mixedTransferMesagePortWith() {
await mixedTransferMessagePortWithOrder1();
await mixedTransferMessagePortWithOrder2();
await mixedTransferMessagePortWithOrder3();
Expand Down Expand Up @@ -197,7 +197,7 @@ promise_test(async t => {
}, "Transferring a MessagePort with a TransformStream should set `.ports`, advanced");

promise_test(async t => {
await mixedTransferMessagePortWith();
await mixedTransferMesagePortWith();
}, "Transferring a MessagePort with multiple streams should set `.ports`");

test(() => {
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/wpt/url/a-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<!-- Other dependencies: resources/urltestdata.json -->


<a id="multiline-entity" download="multiline-entity.txt" href="data:text/plain;charset=utf-8,first%20line&#10;second%20line"> Link with embedded \n is parsed correctly </a>
<a id="multline-entity" download="multline-entity.txt" href="data:text/plain;charset=utf-8,first%20line&#10;second%20line"> Link with embedded \n is parsed correctly </a>

<script type="text/javascript">
test(function() {
const link = document.getElementById("multiline-entity");
const link = document.getElementById("multline-entity");
assert_equals(link.href, "data:text/plain;charset=utf-8,first%20linesecond%20line");
}, "Test that embedded 0x0A is stripped");
</script>
2 changes: 1 addition & 1 deletion test/fixtures/wpt/user-timing/measure-exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

const args = [
51.15, // Verify that number is parsed as string, not number.
"DoesNotExist", // Non-existent mark name should cause error.
"DoesNotExist", // Non-existant mark name should cause error.
];
args.forEach(each => {
test(()=>{
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/user-timing/measure-l3.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ test(function() {
const measureEntry = performance.measure("A", "mark", "mark");
assert_equals(endTime(measureEntry), markEntry.startTime);
assert_equals(measureEntry.startTime, markEntry.startTime);
}, "When start and end mark are both given, the start time and end time of the measure entry should be the the marks' time, respectively");
}, "When start and end mark are both given, the start time and end time of the measure entry should be the the marks' time, repectively");
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
// Since the worker has closed, it's not expected that the
// BroadcastChannel will receive messages (there's a separate test for
// that), so just indicate directly that it's ready to test receiving
// a message from the parent despite the possibility of a race condition.
// a message from the parent dispite the possibility of a race condition.
postMessage('ready');
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
for (let id in ids) {
assert_true(id !== undefined, "id is not undefined");
}
// Note: we use assert_true, rather than assert_equals because we're
// Note: we use assert_true, rather than assert_equals becuase we're
// setting random numbers as IDs - this would mean expectations
// files wouldn't work as intended.
assert_true(crossSiteIframeAboutBlankID !== crossSiteIframeID,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/webstorage/storage_getitem.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
assert_equals(storage.getItem(null), "bar", "storage.getItem(null)")
assert_equals(storage.getItem(""), "baz", "storage.getItem('')")
}, name + ".getItem should be correct")
}, "Get value by getItem(key) and named access in " + name + ".");
}, "Get value by getIten(key) and named access in " + name + ".");
});
2 changes: 1 addition & 1 deletion test/fixtures/wpt/webstorage/storage_length.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
storage.setItem("age", "20");

assert_equals(storage.length, 2, "storage.length")
}, name + ".length (property access)");
}, name + ".length (proprty access)");
});

0 comments on commit b7b3e45

Please sign in to comment.