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 ...@@ -243,6 +243,7 @@ crbug.com/980969 [ Mac ] http/tests/input/discard-events-to-unstable-iframe.html
# Display locking failures # Display locking failures
crbug.com/955533 wpt_internal/display-lock/sizing/overflow-auto-with-overflow.html [ Failure ] crbug.com/955533 wpt_internal/display-lock/sizing/overflow-auto-with-overflow.html [ Failure ]
# Skip some tests for rendersubtree # 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/sizing [ Skip ]
crbug.com/991095 wpt_internal/display-lock/rendersubtree/acquire-clone.html [ Failure ] crbug.com/991095 wpt_internal/display-lock/rendersubtree/acquire-clone.html [ Failure ]
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="scroll-into-view-ref.html"> <link rel="match" href="scroll-into-view-ref.html">
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -15,7 +16,6 @@ body { ...@@ -15,7 +16,6 @@ body {
padding: 0; padding: 0;
} }
#outer { #outer {
contain: style layout;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: lightblue; background: lightblue;
...@@ -36,7 +36,7 @@ body { ...@@ -36,7 +36,7 @@ body {
async_test((t) => { async_test((t) => {
async function runTest() { async function runTest() {
const container = document.getElementById("outer"); const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
let target = document.elementFromPoint(50, 50); let target = document.elementFromPoint(50, 50);
t.step(() => assert_equals(target.id, "outer", "center hits outer")); t.step(() => assert_equals(target.id, "outer", "center hits outer"));
target = document.elementFromPoint(10, 50); target = document.elementFromPoint(10, 50);
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="scroll-into-view-ref.html"> <link rel="match" href="scroll-into-view-ref.html">
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -16,7 +17,6 @@ body { ...@@ -16,7 +17,6 @@ body {
} }
#outer { #outer {
will-change: transform; will-change: transform;
contain: style layout;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: lightblue; background: lightblue;
...@@ -37,7 +37,7 @@ body { ...@@ -37,7 +37,7 @@ body {
async_test((t) => { async_test((t) => {
async function runTest() { async function runTest() {
const container = document.getElementById("outer"); const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
let target = document.elementFromPoint(50, 50); let target = document.elementFromPoint(50, 50);
t.step(() => assert_equals(target.id, "outer", "center hits outer")); t.step(() => assert_equals(target.id, "outer", "center hits outer"));
target = document.elementFromPoint(10, 50); target = document.elementFromPoint(10, 50);
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="scroll-into-view-ref.html"> <link rel="match" href="scroll-into-view-ref.html">
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
...@@ -15,7 +16,6 @@ body { ...@@ -15,7 +16,6 @@ body {
padding: 0; padding: 0;
} }
#outer { #outer {
contain: style layout;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: lightblue; background: lightblue;
...@@ -37,7 +37,7 @@ body { ...@@ -37,7 +37,7 @@ body {
async_test((t) => { async_test((t) => {
async function runTest() { async function runTest() {
const container = document.getElementById("outer"); const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
let target = document.elementFromPoint(50, 50); let target = document.elementFromPoint(50, 50);
t.step(() => assert_equals(target.id, "outer", "center hits outer")); t.step(() => assert_equals(target.id, "outer", "center hits outer"));
target = document.elementFromPoint(10, 50); target = document.elementFromPoint(10, 50);
......
...@@ -6,14 +6,12 @@ ...@@ -6,14 +6,12 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-crossorigin-iframe-doesnt-paint-contents-ref.html"> <link rel="match" href="locked-crossorigin-iframe-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
div { div {
background: blue; background: blue;
} }
iframe {
contain: style layout;
}
</style> </style>
<div>lorem ipsum</div> <div>lorem ipsum</div>
...@@ -23,7 +21,7 @@ iframe { ...@@ -23,7 +21,7 @@ iframe {
<script> <script>
async function runTest() { async function runTest() {
const container = document.getElementById("frame"); const container = document.getElementById("frame");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
takeScreenshot(); takeScreenshot();
} }
......
...@@ -6,13 +6,10 @@ ...@@ -6,13 +6,10 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="pass-if-nothing-below-ref.html"> <link rel="match" href="pass-if-nothing-below-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
div {
contain: style layout;
}
div > div { div > div {
contain: style layout;
position: absolute; position: absolute;
top: 50px; top: 50px;
left: 10px; left: 10px;
...@@ -36,8 +33,8 @@ async function runTest() { ...@@ -36,8 +33,8 @@ async function runTest() {
const target1 = document.getElementById("target1"); const target1 = document.getElementById("target1");
const target2 = document.getElementById("target2"); const target2 = document.getElementById("target2");
let promises = []; let promises = [];
promises.push(target1.displayLock.acquire({ timeout: Infinity, activatable: true })); promises.push(setInvisibleActivatable(target1));
promises.push(target2.displayLock.acquire({ timeout: Infinity, activatable: true })); promises.push(setInvisibleActivatable(target2));
await Promise.all(promises); await Promise.all(promises);
takeScreenshot(); takeScreenshot();
} }
......
...@@ -6,14 +6,12 @@ ...@@ -6,14 +6,12 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-iframe-doesnt-paint-contents-ref.html"> <link rel="match" href="locked-iframe-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
div { div {
background: blue; background: blue;
} }
iframe {
contain: style layout;
}
</style> </style>
<div>lorem ipsum</div> <div>lorem ipsum</div>
...@@ -30,7 +28,7 @@ iframe { ...@@ -30,7 +28,7 @@ iframe {
<script> <script>
async function runTest() { async function runTest() {
const container = document.getElementById("frame"); const container = document.getElementById("frame");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
takeScreenshot(); takeScreenshot();
} }
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-image-doesnt-paint-contents-ref.html"> <link rel="match" href="locked-image-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
div { div {
background: blue; background: blue;
} }
img { img {
contain: style layout;
width: 400px; width: 400px;
height: 200px; height: 200px;
background: lightblue; background: lightblue;
...@@ -28,8 +28,8 @@ img { ...@@ -28,8 +28,8 @@ img {
<script> <script>
async function runTest() { async function runTest() {
const promises = []; const promises = [];
promises.push(document.getElementById("img1").displayLock.acquire({ timeout: Infinity })); promises.push(setInvisible(document.getElementById("img1")));
promises.push(document.getElementById("img2").displayLock.acquire({ timeout: Infinity })); promises.push(setInvisible(document.getElementById("img2")));
await Promise.all(promises); await Promise.all(promises);
takeScreenshot(); takeScreenshot();
} }
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="locked-svg-doesnt-paint-contents-ref.html"> <link rel="match" href="locked-svg-doesnt-paint-contents-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
div { div {
background: blue; background: blue;
} }
svg { svg {
contain: style layout;
border: 1px solid black; border: 1px solid black;
background: lightblue; background: lightblue;
} }
...@@ -36,7 +36,7 @@ svg { ...@@ -36,7 +36,7 @@ svg {
<script> <script>
async function runTest() { async function runTest() {
const container = document.getElementById("svg"); const container = document.getElementById("svg");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
takeScreenshot(); takeScreenshot();
} }
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="pass-if-nothing-below-ref.html"> <link rel="match" href="pass-if-nothing-below-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
#outer { #outer {
contain: style layout;
width: 100px; width: 100px;
height: 100px; height: 100px;
color: blue; color: blue;
...@@ -34,7 +34,7 @@ The test passes if there's nothing below. ...@@ -34,7 +34,7 @@ The test passes if there's nothing below.
<script> <script>
async function runTest() { async function runTest() {
const container = document.getElementById("outer"); const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
takeScreenshot(); takeScreenshot();
} }
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<link rel="help" href="https://github.com/WICG/display-locking"> <link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="non-composited-lock-composited-descendant-ref.html"> <link rel="match" href="non-composited-lock-composited-descendant-ref.html">
<script src="/common/reftest-wait.js"></script> <script src="/common/reftest-wait.js"></script>
<script src="../resources/utils.js"></script>
<style> <style>
#outer { #outer {
contain: style layout;
width: 100px; width: 100px;
height: 100px; height: 100px;
background: lightblue; background: lightblue;
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
<script> <script>
async function commitAndFinish() { async function commitAndFinish() {
const container = document.getElementById("outer"); const container = document.getElementById("outer");
await container.displayLock.commit(); await setVisible(container);
takeScreenshot(); takeScreenshot();
} }
async function runTest() { async function runTest() {
const container = document.getElementById("outer"); const container = document.getElementById("outer");
await container.displayLock.acquire({ timeout: Infinity }); await setInvisible(container);
requestAnimationFrame(commitAndFinish); 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