aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/tests')
-rw-r--r--tests/wpt/tests/css/css-transforms/individual-transform/individual-transform-3.html40
-rw-r--r--tests/wpt/tests/css/css-transforms/transform-matrix-009.html41
-rw-r--r--tests/wpt/tests/css/css-transitions/transition-zero-duration-with-delay.html1
-rw-r--r--tests/wpt/tests/preload/preload-csp.sub.html6
4 files changed, 84 insertions, 4 deletions
diff --git a/tests/wpt/tests/css/css-transforms/individual-transform/individual-transform-3.html b/tests/wpt/tests/css/css-transforms/individual-transform/individual-transform-3.html
new file mode 100644
index 00000000000..2c81cb12156
--- /dev/null
+++ b/tests/wpt/tests/css/css-transforms/individual-transform/individual-transform-3.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Individual transform: non-invertible matrix</title>
+<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms">
+<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm">
+<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-function-lists">
+<link rel="help" href="https://github.com/servo/servo/issues/37146">
+<link rel="match" href="../../reference/ref-filled-green-200px-square.html">
+<meta name="assert" content="Tests that the element isn't rendered when
+ the current transformation matrix is non-invertible because of `scale`.">
+
+<style>
+.wrapper {
+ width: 200px;
+ height: 200px;
+ background: green;
+}
+.wrapper > div {
+ width: 200px;
+ height: 20px;
+ background: red;
+}
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+<div class="wrapper">
+ <div style="scale: 0"></div>
+ <div style="scale: 0 0"></div>
+ <div style="scale: 0 1"></div>
+ <div style="scale: 1 0"></div>
+ <div style="scale: 0 0 0"></div>
+ <div style="scale: 0 0 1"></div>
+ <div style="scale: 0 1 0"></div>
+ <div style="scale: 0 1 1"></div>
+ <div style="scale: 1 0 0"></div>
+ <div style="scale: 1 0 1"></div>
+ <div style="scale: 1 1 0"></div>
+</div>
diff --git a/tests/wpt/tests/css/css-transforms/transform-matrix-009.html b/tests/wpt/tests/css/css-transforms/transform-matrix-009.html
new file mode 100644
index 00000000000..81f04db0d10
--- /dev/null
+++ b/tests/wpt/tests/css/css-transforms/transform-matrix-009.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Test (Transforms): matrix() with zeros in the diagonal</title>
+<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
+<link rel="help" href="https://www.w3.org/TR/css-transforms-1/#funcdef-transform-matrix">
+<link rel="help" href="https://www.w3.org/TR/css-transforms-1/#transform-function-lists">
+<link rel="help" href="https://github.com/servo/servo/issues/37146">
+<link rel="match" href="../reference/ref-filled-green-200px-square.html">
+<meta name="assert" content="Tests that the element is still rendered,
+ even though the current transformation matrix has zeros in the diagonal,
+ as long as the matrix remains invertible.">
+
+<style>
+.wrapper {
+ width: 200px;
+ height: 200px;
+ background: red;
+}
+.test {
+ width: 200px;
+ height: 200px;
+ background: green;
+ transform: matrix(0,1, 1,0, 0,0);
+ /*
+ The resulting matrix is:
+ ┌ ┐
+ │ 0 1 0 0 │
+ │ 1 0 0 0 │
+ │ 0 0 1 0 │
+ │ 0 0 0 1 │
+ └ ┘
+ It could result from e.g. `scaleX(-1) rotate(90deg)`.
+ */
+}
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+<div class="wrapper">
+ <div class="test"></div>
+</div>
diff --git a/tests/wpt/tests/css/css-transitions/transition-zero-duration-with-delay.html b/tests/wpt/tests/css/css-transitions/transition-zero-duration-with-delay.html
index 0b6b9c37a9b..308d8f3784f 100644
--- a/tests/wpt/tests/css/css-transitions/transition-zero-duration-with-delay.html
+++ b/tests/wpt/tests/css/css-transitions/transition-zero-duration-with-delay.html
@@ -30,7 +30,6 @@ promise_test(async t => {
div.style.transition = 'width 0s linear 0.3s';
// Set width back to 0
- const startTime = performance.now();
div.style.width = '0px';
// Immediate check - should NOT have changed yet
const computedStart = getComputedStyle(div).width;
diff --git a/tests/wpt/tests/preload/preload-csp.sub.html b/tests/wpt/tests/preload/preload-csp.sub.html
index a1b57b78b41..2238d6cafe8 100644
--- a/tests/wpt/tests/preload/preload-csp.sub.html
+++ b/tests/wpt/tests/preload/preload-csp.sub.html
@@ -24,13 +24,13 @@ promise_test(async (t) => {
for (const link of links) {
if (link.rel === 'preload') {
const r = /\?key=([a-zA-Z0-9\-]+)$/;
- keys.push(link.href.match(r)[1]);
+ keys.push([link.href, link.as, link.href.match(r)[1]]);
}
}
await new Promise((resolve) => step_timeout(resolve, 3000));
- for (const key of keys) {
- assert_false(await hasArrivedAtServer(key));
+ for (const [href, type, key] of keys) {
+ assert_false(await hasArrivedAtServer(key), `Preload with href ${href}, type ${type} and key ${key} should not have arrived at the server.`);
}
}, 'Preload requests are blocked by CSP.');
</script>