The bottom image should display the same image as the top image.
+
Original Image:
+
+
Image after copy/paste:
+
+
+
-
-Note: This is a manual test because it writes/reads to the shared system
-clipboard and thus cannot be run async with other tests that might interact
-with the clipboard.
-
-The bottom image should display the same image as the top image.
+
+ Note: This is a manual test because it writes/reads to the shared system
+ clipboard and thus cannot be run async with other tests that might interact
+ with the clipboard.
+
diff --git a/tests/wpt/web-platform-tests/css/css-logical/logical-box-border-radius.html b/tests/wpt/web-platform-tests/css/css-logical/logical-box-border-radius.html
new file mode 100644
index 00000000000..81b8fa0fece
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-logical/logical-box-border-radius.html
@@ -0,0 +1,18 @@
+
+
+CSS Logical Properties: flow-relative border-radius
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js b/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js
index 1f17ff296ff..ef1854f97de 100644
--- a/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js
+++ b/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js
@@ -66,6 +66,41 @@ export function createBoxPropertyGroup(property, descriptor) {
return {logical, physical, shorthands, type, prerequisites, property};
}
+/**
+ * Creates a group physical and logical box-corner properties.
+ *
+ * @param {string} property
+ * A string representing the property names, like "border-*-radius".
+ * @param {Object} descriptor
+ * @param {string|string[]} descriptor.type
+ * Describes the kind of values accepted by the property, like "length".
+ * Must be a key or a collection of keys from the `testValues` object.
+ * @param {Object={}} descriptor.prerequisites
+ * Represents property declarations that are needed by `property` to work.
+ * For example, border-width properties require a border style.
+ */
+export function createCornerPropertyGroup(property, descriptor) {
+ const logical = {};
+ const physical = {};
+ const shorthands = {};
+ for (const logicalCorner of ["start-start", "start-end", "end-start", "end-end"]) {
+ const prop = property.replace("*", logicalCorner);
+ const [block_side, inline_side] = logicalCorner.split("-");
+ const b = "block" + block_side.charAt(0).toUpperCase() + block_side.slice(1);
+ const i = "inline" + inline_side.charAt(0).toUpperCase() + inline_side.slice(1);
+ const index = b + "-" + i; // e.g. "blockStart-inlineEnd"
+ logical[index] = prop;
+ }
+ let prerequisites = "";
+ for (const physicalCorner of ["top-left", "top-right", "bottom-left", "bottom-right"]) {
+ const prop = property.replace("*", physicalCorner);
+ physical[physicalCorner] = prop;
+ prerequisites += makeDeclaration(descriptor.prerequisites, physicalCorner);
+ }
+ const type = [].concat(descriptor.type);
+ return {logical, physical, shorthands, type, prerequisites, property};
+}
+
/**
* Creates a group of physical and logical sizing properties.
*
@@ -101,6 +136,7 @@ export function runTests(group) {
const logicals = Object.values(group.logical);
const physicals = Object.values(group.physical);
const shorthands = group.shorthands ? Object.entries(group.shorthands) : null;
+ const is_corner = group.property == "border-*-radius";
test(function() {
const expected = [];
@@ -141,7 +177,22 @@ export function runTests(group) {
const associated = {};
for (const [logicalSide, logicalProp] of Object.entries(group.logical)) {
- const physicalProp = group.physical[writingMode[logicalSide]];
+ let physicalProp;
+ if (is_corner) {
+ const [ block_side, inline_side] = logicalSide.split("-");
+ const physicalSide1 = writingMode[block_side];
+ const physicalSide2 = writingMode[inline_side];
+ let physicalCorner;
+ // mirror "left-top" to "top-left" etc
+ if (["top", "bottom"].includes(physicalSide1)) {
+ physicalCorner = physicalSide1 + "-" + physicalSide2;
+ } else {
+ physicalCorner = physicalSide2 + "-" + physicalSide1;
+ }
+ physicalProp = group.physical[physicalCorner];
+ } else {
+ physicalProp = group.physical[writingMode[logicalSide]];
+ }
associated[logicalProp] = physicalProp;
associated[physicalProp] = logicalProp;
}
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/heuristic-with-offset-update.html b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/heuristic-with-offset-update.html
new file mode 100644
index 00000000000..7fcbd983ed5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/heuristic-with-offset-update.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js b/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js
index a0756e385de..e2577f35c3f 100644
--- a/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js
+++ b/tests/wpt/web-platform-tests/feature-policy/resources/featurepolicy.js
@@ -83,7 +83,7 @@ function test_feature_availability_with_post_message_result(
// tests the feature availability and posts the result back to the parent.
// Otherwise, does nothing.
function test_feature_in_iframe(feature_name, feature_promise_factory) {
- if (location.hash.includes(feature_name)) {
+ if (location.hash.endsWith(`#${feature_name}`)) {
feature_promise_factory().then(
() => window.parent.postMessage('#OK', '*'),
(e) => window.parent.postMessage('#' + e.name, '*'));
diff --git a/tests/wpt/web-platform-tests/kv-storage/api-surface.https.html b/tests/wpt/web-platform-tests/kv-storage/api-surface.https.html
index 65452f55be0..90e705862d5 100644
--- a/tests/wpt/web-platform-tests/kv-storage/api-surface.https.html
+++ b/tests/wpt/web-platform-tests/kv-storage/api-surface.https.html
@@ -23,7 +23,9 @@ test(() => {
classAssert.propertyKeys(StorageArea.prototype, [
"constructor", "set", "get", "delete", "clear",
"keys", "values", "entries", "backingStore"
- ], []);
+ ], [
+ Symbol.asyncIterator
+ ]);
classAssert.methods(StorageArea.prototype, {
set: 2,
@@ -40,6 +42,10 @@ test(() => {
});
}, "StorageArea.prototype methods and properties");
+test(() => {
+ assert_equals(StorageArea.prototype[Symbol.asyncIterator], StorageArea.prototype.entries);
+}, "[Symbol.asyncIterator]() and entries() must be the same function");
+
testWithArea(async area => {
classAssert.propertyKeys(area, [], []);
}, "Instances don't have any properties");
diff --git a/tests/wpt/web-platform-tests/kv-storage/cause-errors-via-idb.https.html b/tests/wpt/web-platform-tests/kv-storage/cause-errors-via-idb.https.html
new file mode 100644
index 00000000000..21fe36b36cb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/kv-storage/cause-errors-via-idb.https.html
@@ -0,0 +1,53 @@
+
+
+KV Storage: causing errors by directly manipulating the IDB
+
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/kv-storage/entries.https.html b/tests/wpt/web-platform-tests/kv-storage/entries.https.html
new file mode 100644
index 00000000000..0d1ab849a70
--- /dev/null
+++ b/tests/wpt/web-platform-tests/kv-storage/entries.https.html
@@ -0,0 +1,290 @@
+
+
+KV Storage: entries() trickier tests
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/kv-storage/helpers/class-assert.js b/tests/wpt/web-platform-tests/kv-storage/helpers/class-assert.js
index 31b25cab9f2..89f0889c56d 100644
--- a/tests/wpt/web-platform-tests/kv-storage/helpers/class-assert.js
+++ b/tests/wpt/web-platform-tests/kv-storage/helpers/class-assert.js
@@ -38,6 +38,38 @@ export function propertyKeys(o, expectedNames, expectedSymbols, label) {
`${label}property symbols`);
}
+export function iterResultCustom(o, expectedValue, expectedDone, valueAsserter, label) {
+ label = formatLabel(label);
+
+ assert_equals(typeof expectedDone, "boolean",
+ `${label} iterResult assert usage check: expectedDone must be a boolean`);
+
+ propertyKeys(o, ["value", "done"], [], label);
+ assert_equals(Object.getPrototypeOf(o), Object.prototype, `${label}prototype must be Object.prototype`);
+ valueAsserter(o.value, expectedValue, `${label}value`);
+ assert_equals(o.done, expectedDone, `${label}done`);
+}
+
+export function iterResult(o, expectedValue, expectedDone, label) {
+ return iterResultCustom(o, expectedValue, expectedDone, assert_equals, label);
+}
+
+export function iterResultsCustom(actualArray, expectedArrayOfArrays, valueAsserter, label) {
+ label = formatLabel(label);
+
+ assert_equals(actualArray.length, expectedArrayOfArrays.length,
+ `${label} iterResults assert usage check: actual and expected must have the same length`);
+
+ for (let i = 0; i < actualArray.length; ++i) {
+ const [expectedValue, expectedDone] = expectedArrayOfArrays[i];
+ iterResultCustom(actualArray[i], expectedValue, expectedDone, valueAsserter, `${label}iter result ${i}`);
+ }
+}
+
+export function iterResults(actualArray, expectedArrayOfArrays, label) {
+ return iterResultsCustom(actualArray, expectedArrayOfArrays, assert_equals, label);
+}
+
export function methods(o, expectedMethods) {
for (const [name, length] of Object.entries(expectedMethods)) {
method(o, name, length);
@@ -103,5 +135,5 @@ function isConstructorTest(o) {
}
function formatLabel(label) {
- return label !== undefined ? ` ${label}` : "";
+ return label !== undefined ? `${label} ` : "";
}
diff --git a/tests/wpt/web-platform-tests/kv-storage/helpers/equality-asserters.js b/tests/wpt/web-platform-tests/kv-storage/helpers/equality-asserters.js
index ad4623c179d..448ab31348c 100644
--- a/tests/wpt/web-platform-tests/kv-storage/helpers/equality-asserters.js
+++ b/tests/wpt/web-platform-tests/kv-storage/helpers/equality-asserters.js
@@ -1,37 +1,91 @@
export function assertEqualDates(actual, expected, label) {
- assert_equals(expected.constructor, Date,
- "assertEqualDates usage check: expected must be a Date");
+ label = formatLabel(label);
- const labelPart = label === undefined ? "" : `${label}: `;
- assert_equals(actual.constructor, Date, `${labelPart}must be a Date`);
- assert_equals(actual.valueOf(), expected.valueOf(), `${labelPart}timestamps must match`);
+ assert_equals(expected.constructor, Date,
+ `${label}assertEqualDates usage check: expected must be a Date`);
+
+ assert_equals(actual.constructor, Date, `${label}must be a Date`);
+ assert_equals(actual.valueOf(), expected.valueOf(), `${label}timestamps must match`);
+}
+
+export function assertEqualPostKeyRoundtripping(actual, expected, label) {
+ label = formatLabel(label);
+
+ // Please extend this to support other types as needed!
+ assert_true(
+ typeof expected === "number" || typeof expected === "string" || expected.constructor === Date,
+ `${label}assertEqualPostKeyRoundtripping usage check: currently only supports numbers, strings, and dates`
+ );
+
+ if (expected.constructor === Date) {
+ assert_equals(actual.constructor, Date, `${label}comparing to Date(${Number(expected)}) (actual = ${actual})`);
+ actual = Number(actual);
+ expected = Number(expected);
+ }
+
+ assert_equals(actual, expected, label);
}
export function assertEqualArrayBuffers(actual, expected, label) {
- assert_equals(expected.constructor, ArrayBuffer,
- "assertEqualArrayBuffers usage check: expected must be an ArrayBuffer");
+ label = formatLabel(label);
- const labelPart = label === undefined ? "" : `${label}: `;
- assert_equals(actual.constructor, ArrayBuffer, `${labelPart}must be an ArrayBuffer`);
- assert_array_equals(new Uint8Array(actual), new Uint8Array(expected), `${labelPart}must match`);
+ assert_equals(expected.constructor, ArrayBuffer,
+ `${label}assertEqualArrayBuffers usage check: expected must be an ArrayBuffer`);
+
+ assert_equals(actual.constructor, ArrayBuffer, `${label}must be an ArrayBuffer`);
+ assert_array_equals(new Uint8Array(actual), new Uint8Array(expected), `${label}must match`);
}
export function assertArrayBufferEqualsABView(actual, expected, label) {
+ label = formatLabel(label);
+
assert_true(ArrayBuffer.isView(expected),
- "assertArrayBufferEqualsABView usage check: expected must be an ArrayBuffer view");
+ `${label}assertArrayBufferEqualsABView usage check: expected must be an ArrayBuffer view`);
assertEqualArrayBuffers(actual, expected.buffer, label);
}
-export function assertArrayCustomEquals(actual, expected, equalityAsserter, label) {
- assert_true(Array.isArray(expected),
- "assertArrayCustomEquals usage check: expected must be an Array");
+export function assertAsyncIteratorEquals(actual, expected, label) {
+ return assertAsyncIteratorCustomEquals(actual, expected, Object.is, label);
+}
- const labelPart = label === undefined ? "" : `${label}: `;
- assert_true(Array.isArray(actual), `${labelPart}must be an array`);
- assert_equals(actual.length, expected.length, `${labelPart}length must be as expected`);
+export function assertArrayCustomEquals(actual, expected, equalityAsserter, label) {
+ label = formatLabel(label);
+
+ assert_true(Array.isArray(expected),
+ `${label} assertArrayCustomEquals usage check: expected must be an Array`);
+
+ assert_true(Array.isArray(actual), `${label}must be an array`);
+ assert_equals(actual.length, expected.length, `${label}length must be as expected`);
for (let i = 0; i < actual.length; ++i) {
- equalityAsserter(actual[i], expected[i], `${labelPart}index ${i}`);
+ equalityAsserter(actual[i], expected[i], `${label}index ${i}`);
}
}
+
+export async function assertAsyncIteratorCustomEquals(actual, expected, equalityAsserter, label) {
+ label = formatLabel(label);
+
+ assert_true(Array.isArray(expected),
+ `${label} assertAsyncIteratorCustomEquals usage check: expected must be an Array`);
+
+ const collected = await collectAsyncIterator(actual);
+ assert_equals(collected.length, expected.length, `${label}length must be as expected`);
+
+ for (let i = 0; i < collected.length; ++i) {
+ equalityAsserter(collected[i], expected[i], `${label}index ${i}`);
+ }
+}
+
+async function collectAsyncIterator(asyncIterator) {
+ const array = [];
+ for await (const entry of asyncIterator) {
+ array.push(entry);
+ }
+
+ return array;
+}
+
+function formatLabel(label) {
+ return label !== undefined ? `${label} ` : "";
+}
diff --git a/tests/wpt/web-platform-tests/kv-storage/helpers/kvs-tests.js b/tests/wpt/web-platform-tests/kv-storage/helpers/kvs-tests.js
index 0ffe71fad78..a6c4d58dfa5 100644
--- a/tests/wpt/web-platform-tests/kv-storage/helpers/kvs-tests.js
+++ b/tests/wpt/web-platform-tests/kv-storage/helpers/kvs-tests.js
@@ -1,5 +1,5 @@
import { StorageArea, storage as defaultArea } from "std:kv-storage";
-import { assertArrayCustomEquals } from "./equality-asserters.js";
+import { assertAsyncIteratorEquals, assertAsyncIteratorCustomEquals } from "./equality-asserters.js";
export function testWithArea(testFn, description) {
promise_test(t => {
@@ -36,23 +36,24 @@ function testVariousMethodsInner(key, value, keyEqualityAsserter) {
await assertPromiseEquals(area.get(key), value, "get()", "the set value");
- const keysPromise = area.keys();
- assertIsPromise(keysPromise, "keys()");
- assertArrayCustomEquals(await keysPromise, [key], keyEqualityAsserter, "keys() must have the key");
+ const keysIter = area.keys();
+ await assertAsyncIteratorCustomEquals(keysIter, [key], keyEqualityAsserter, "keys() must have the key");
- const valuesPromise = area.values();
- assertIsPromise(valuesPromise);
- assert_array_equals(await valuesPromise, [value], "values() must have the value");
+ const valuesIter = area.values();
+ await assertAsyncIteratorEquals(valuesIter, [value], "values() must have the value");
- const entriesPromise = area.entries();
- assertIsPromise(entriesPromise, "entries()");
- const entries = await entriesPromise;
- assert_true(Array.isArray(entries), "entries() must give an array");
- assert_equals(entries.length, 1, "entries() must have only one value");
- assert_true(Array.isArray(entries[0]), "entries() 0th element must be an array");
- assert_equals(entries[0].length, 2, "entries() 0th element must have 2 elements");
- keyEqualityAsserter(entries[0][0], key, "entries() 0th element's 0th element must be the key");
- assert_equals(entries[0][1], value, "entries() 0th element's 1st element must be the value");
+ const entriesIter = area.entries();
+
+ const entry0 = await entriesIter.next();
+ assert_false(entry0.done, "entries() 0th iter-result must not be done");
+ assert_true(Array.isArray(entry0.value), "entries() 0th iter-result value must be an array");
+ assert_equals(entry0.value.length, 2, "entries() 0th iter-result value must have 2 elements");
+ keyEqualityAsserter(entry0.value[0], key, "entries() 0th iter-result value's 0th element must be the key");
+ assert_equals(entry0.value[1], value, "entries() 0th iter-result value's 1st element must be the value");
+
+ const entry1 = await entriesIter.next();
+ assert_true(entry1.done, "entries() 1st iter-result must be done");
+ assert_equals(entry1.value, undefined, "entries() 1st iter-result must have undefined value");
await assertPromiseEquals(area.delete(key), undefined, "delete()", "undefined");
diff --git a/tests/wpt/web-platform-tests/kv-storage/keys-values-entries.https.html b/tests/wpt/web-platform-tests/kv-storage/keys-values-entries.https.html
new file mode 100644
index 00000000000..b26323809bb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/kv-storage/keys-values-entries.https.html
@@ -0,0 +1,95 @@
+
+
+KV Storage: keys()/values()/entries()
+
+
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/kv-storage/keys.https.html b/tests/wpt/web-platform-tests/kv-storage/keys.https.html
new file mode 100644
index 00000000000..a6be29725bf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/kv-storage/keys.https.html
@@ -0,0 +1,236 @@
+
+
+KV Storage: keys() trickier tests
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/kv-storage/undefined-value.https.html b/tests/wpt/web-platform-tests/kv-storage/undefined-value.https.html
index 89da5d5c44f..4cb483a3d98 100644
--- a/tests/wpt/web-platform-tests/kv-storage/undefined-value.https.html
+++ b/tests/wpt/web-platform-tests/kv-storage/undefined-value.https.html
@@ -9,6 +9,7 @@
diff --git a/tests/wpt/web-platform-tests/kv-storage/values.https.html b/tests/wpt/web-platform-tests/kv-storage/values.https.html
new file mode 100644
index 00000000000..64756bf195f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/kv-storage/values.https.html
@@ -0,0 +1,231 @@
+
+
+KV Storage: values() trickier tests
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html
index 21e3f5b9af8..2e38b9e6864 100644
--- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html
+++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.html
@@ -7,56 +7,73 @@
-
-
-
-
-
-
-
-
-
-