Commit a689f9ab authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Commit Bot

DL: Move tests from paint/ to rendersubtree/paint

Move the tests and change them to use the rendersubtree attribute.
Note that the SVG test fails because the rendersubtree attribute is
only defined on HTML elements.

Bug: 991095
Change-Id: I4515d4db3786d7bcd1863e7b5407d88dbbf3c016
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773017Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690899}
parent cbfb05ed
......@@ -243,6 +243,7 @@ crbug.com/980969 [ Mac ] http/tests/input/discard-events-to-unstable-iframe.html
# Display locking failures
crbug.com/955533 wpt_internal/display-lock/sizing/overflow-auto-with-overflow.html [ Failure ]
# Skip some tests for rendersubtree
crbug.com/991095 wpt_internal/display-lock/rendersubtree/paint/locked-svg-doesnt-paint-contents.html [ Skip ]
crbug.com/991095 wpt_internal/display-lock/rendersubtree/sizing [ Skip ]
crbug.com/991095 wpt_internal/display-lock/rendersubtree/acquire-clone.html [ Failure ]
......
......@@ -5,6 +5,7 @@
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="scroll-into-view-ref.html">
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
......@@ -15,7 +16,6 @@ body {
padding: 0;
}
#outer {
contain: style layout;
width: 100px;
height: 100px;
background: lightblue;
......@@ -36,7 +36,7 @@ body {
async_test((t) => {
async function runTest() {
const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
let target = document.elementFromPoint(50, 50);
t.step(() => assert_equals(target.id, "outer", "center hits outer"));
target = document.elementFromPoint(10, 50);
......
......@@ -5,6 +5,7 @@
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="scroll-into-view-ref.html">
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
......@@ -16,7 +17,6 @@ body {
}
#outer {
will-change: transform;
contain: style layout;
width: 100px;
height: 100px;
background: lightblue;
......@@ -37,7 +37,7 @@ body {
async_test((t) => {
async function runTest() {
const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
let target = document.elementFromPoint(50, 50);
t.step(() => assert_equals(target.id, "outer", "center hits outer"));
target = document.elementFromPoint(10, 50);
......
......@@ -5,6 +5,7 @@
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="scroll-into-view-ref.html">
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
......@@ -15,7 +16,6 @@ body {
padding: 0;
}
#outer {
contain: style layout;
width: 100px;
height: 100px;
background: lightblue;
......@@ -37,7 +37,7 @@ body {
async_test((t) => {
async function runTest() {
const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
let target = document.elementFromPoint(50, 50);
t.step(() => assert_equals(target.id, "outer", "center hits outer"));
target = document.elementFromPoint(10, 50);
......
......@@ -6,14 +6,12 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-crossorigin-iframe-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
div {
background: blue;
}
iframe {
contain: style layout;
}
</style>
<div>lorem ipsum</div>
......@@ -23,7 +21,7 @@ iframe {
<script>
async function runTest() {
const container = document.getElementById("frame");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
takeScreenshot();
}
......
......@@ -6,13 +6,10 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="pass-if-nothing-below-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
div {
contain: style layout;
}
div > div {
contain: style layout;
position: absolute;
top: 50px;
left: 10px;
......@@ -36,8 +33,8 @@ async function runTest() {
const target1 = document.getElementById("target1");
const target2 = document.getElementById("target2");
let promises = [];
promises.push(target1.displayLock.acquire({ timeout: Infinity, activatable: true }));
promises.push(target2.displayLock.acquire({ timeout: Infinity, activatable: true }));
promises.push(setInvisibleActivatable(target1));
promises.push(setInvisibleActivatable(target2));
await Promise.all(promises);
takeScreenshot();
}
......
......@@ -6,14 +6,12 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-iframe-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
div {
background: blue;
}
iframe {
contain: style layout;
}
</style>
<div>lorem ipsum</div>
......@@ -30,7 +28,7 @@ iframe {
<script>
async function runTest() {
const container = document.getElementById("frame");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
takeScreenshot();
}
......
......@@ -6,13 +6,13 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-image-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
div {
background: blue;
}
img {
contain: style layout;
width: 400px;
height: 200px;
background: lightblue;
......@@ -28,8 +28,8 @@ img {
<script>
async function runTest() {
const promises = [];
promises.push(document.getElementById("img1").displayLock.acquire({ timeout: Infinity }));
promises.push(document.getElementById("img2").displayLock.acquire({ timeout: Infinity }));
promises.push(setInvisible(document.getElementById("img1")));
promises.push(setInvisible(document.getElementById("img2")));
await Promise.all(promises);
takeScreenshot();
}
......
......@@ -6,13 +6,13 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-svg-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
div {
background: blue;
}
svg {
contain: style layout;
border: 1px solid black;
background: lightblue;
}
......@@ -36,7 +36,7 @@ svg {
<script>
async function runTest() {
const container = document.getElementById("svg");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
takeScreenshot();
}
......
......@@ -6,10 +6,10 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="pass-if-nothing-below-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
#outer {
contain: style layout;
width: 100px;
height: 100px;
color: blue;
......@@ -34,7 +34,7 @@ The test passes if there's nothing below.
<script>
async function runTest() {
const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
takeScreenshot();
}
......
......@@ -6,10 +6,10 @@
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="non-composited-lock-composited-descendant-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style>
#outer {
contain: style layout;
width: 100px;
height: 100px;
background: lightblue;
......@@ -34,13 +34,13 @@
<script>
async function commitAndFinish() {
const container = document.getElementById("outer");
await container.displayLock.commit();
await setVisible(container);
takeScreenshot();
}
async function runTest() {
const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity });
await setInvisible(container);
requestAnimationFrame(commitAndFinish);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment