Skip to content

Commit

Permalink
Import wpt@f5ca566a191992d6e37b17302505991bca5d9c34
Browse files Browse the repository at this point in the history
Using wpt-import in Chromium 582bc1e.
With Chromium commits locally applied on WPT:
6c499ee "Revert recent changes to inheritance of direction and language for <slot> elements."
0f6bbe9 "[FedCM] Enable the IDP Login Status API by default"



Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md

NOAUTOREVERT=true
R=rubber-stamper@appspot.gserviceaccount.com

No-Export: true
Validate-Test-Flakiness: skip
Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel,linux-blink-rel
Change-Id: I102616d87b8c2dae1620207abaf5b264ee28f81d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4986201
Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1216484}
  • Loading branch information
Chromium WPT Sync authored and Chromium LUCI CQ committed Oct 28, 2023
1 parent b11bd71 commit 999b6da
Show file tree
Hide file tree
Showing 34 changed files with 375 additions and 343 deletions.
237 changes: 192 additions & 45 deletions third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This is a testharness.js-based test.
[FAIL] Nested color-mix function with inner currentColor should inherit unresolved
assert_equals: expected "lch(0 0 none)" but got "lch(0 0 0)"
Harness: the test ran to completion.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
</div>
<script>
test(() => {
assert_equals(getComputedStyle(child).backgroundColor, "lch(0 0 0)");
assert_equals(getComputedStyle(child).backgroundColor, "lch(0 0 none)");
}, "Nested color-mix function with inner currentColor should inherit unresolved");
</script>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: rgba() colors</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
<link rel="author" title="Chris Lilley" href="https://svgees.us" />
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
<style type="text/css"><![CDATA[
html, body { background: white; color: black; }
#one, #two { width: 12em; height: 12em; }
#one { background-color: rgb(102, 102, 102); margin-bottom: 0 }
]]></style>
</head>
<body>
<p>The test passes if you see a gray square:</p>
<p id="one"></p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
<link rel="help" href="http://www.w3.org/TR/css3-color/#transparency" />
<link rel="help" href="http://www.w3.org/TR/css3-color/#rgb-color" />
<link rel="match" href="t32-opacity-basic-0.6-a-ref.html" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<link rel="match" href="t32-opacity-basic-0.6-a-ref.xht" />
<meta name="assert" content="Opacity of 0.6 makes box partially opaque. Colors are in sRGB color space (may test)." />
<style type="text/css"><![CDATA[
html, body { background: white; color: black; }
#one, #two { font-family: Ahem; }
#one { color: rgb(102, 102, 102); }
#one, #two { width: 12em; height: 12em; }
#one { background-color: rgb(102, 102, 102); }
#two { opacity: 0.6; }
]]></style>
</head>
<body>
<p>The test passes if the two lines below look identical:</p>
<p id="one">This text should be the same color as the line below.</p>
<p id="two">This text should be the same color as the line above.</p>
<p>The test passes if you see a gray square:</p>
<p id="one"></p>
<p id="two"></p>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: rgba() colors</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
<link rel="author" title="Chris Lilley" href="https://svgees.us" />
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
<style type="text/css"><![CDATA[
html, body { background: white; color: black; }
#one, #two { width: 12em; height: 12em; }
#one { background-color: rgb(102, 102, 102); margin-bottom: 0 }
]]></style>
</head>
<body>
<p>The test passes if you see a gray square:</p>
<p id="one"></p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
<head>
<title>CSS Test: rgba() colors</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
<link rel="author" title="Chris Lilley" href="https://svgees.us" />
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
<link rel="help" href="http://www.w3.org/TR/css3-color/#rgba-color" />
<link rel="help" href="http://www.w3.org/TR/css3-color/#rgb-color" />
<link rel="match" href="t32-opacity-basic-0.6-a-ref.html" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<meta name="assert" content="Opacity of 0.6 makes text partially opaque. Colors are in sRGB color space (may test)." />
<link rel="match" href="t422-rgba-a0.6-a-ref.xht" />
<meta name="assert" content="Opacity of 0.6 makes background partially opaque. Colors are in sRGB color space (may test)." />
<style type="text/css"><![CDATA[
html, body { background: white; color: black; }
#one, #two { font-family: Ahem; }
#one { color: rgb(102, 102, 102); }
#two { color: rgba(0, 0, 0, 0.6); }
#one, #two { width: 12em; height: 6em; }
#one { background-color: rgb(102, 102, 102); margin-bottom: 0 }
#two { background-color: rgba(0, 0, 0, 0.6); margin-top:0 }
]]></style>
</head>
<body>
<p>The test passes if the two lines below look identical:</p>
<p id="one">This text should be the same color as the line below.</p>
<p id="two">This text should be the same color as the line above.</p>
<p>The test passes if you see a gray square:</p>
<p id="one"></p>
<p id="two"></p>
</body>
</html>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: hsla()</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
<link rel="author" title="Chris Lilley" href="https://svgees.us" />
<style type="text/css"><![CDATA[
html, body { background: white; }
div { width: 12em; height: 12em; }
#one { background-color: hsla(120, 100%, 70%, 1.0); margin-bottom: 0 }
]]></style>
</head>
<body>
<p>Test passes if you see a light green square.</p>
<div id="one"></div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,29 @@
<head>
<title>CSS Test: hsla()</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/" />
<link rel="author" title="Chris Lilley" href="https://svgees.us" />
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
<link rel="help" href="http://www.w3.org/TR/css3-color/#hsla-color" />
<link rel="match" href="t425-hsla-basic-a-ref.html" />
<link rel="match" href="t425-hsla-basic-a-ref.xht" />
<meta name="assert" content="Test basic functioning of hsla() colors." />
<style type="text/css"><![CDATA[
html, body { background: white; }
div { width: 600px; height: 30px; margin-bottom: 10px; }
#one { background-color: hsla(120, 100%, 70%, 1.0); }
#two { background-color: hsla(120, 100%, 50%, 0.6); }
div { width: 12em; height: 6em; }
#one { background-color: hsla(120, 100%, 70%, 1.0); margin-bottom: 0 }
#two { background-color: hsla(120, 100%, 50%, 0.6); margin-top:0 }
]]></style>
/*
hsla(120, 100%, 70%, 1.0) is rgb(40% 100% 40%)
hsla(120, 100%, 50%, 0.6) is rgb(0% 100% 0% / 0.6)
composite rgb values at 60% over white in sRGB = rgb(40% 100% 40%)
BUT if compositing is done with used values, in device RGB
you will get a mismatch on WCG screen
because the red and blue components will not be zero
and the green will not be 100%
*/
</head>
<body>
<p>Test passes if the two boxes below are the same color.</p>
<p>Test passes if you see a light green square.</p>
<div id="one"></div>
<div id="two"></div>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,10 @@
cvhiddenwithupdate.getBoundingClientRect();
assert_true(cvhiddenwithupdate.checkVisibility());
}, 'checkVisibility on content-visibility:hidden element after forced layout update.');

test(() => {
document.documentElement.style.contentVisibility = "hidden";
assert_true(document.documentElement.checkVisibility());
document.documentElement.style.removeProperty("content-visibility");
}, 'checkVisibility on root element with content-visibility: hidden returns true.');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Test focus is moved to the previously focused element when dialog is closed</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>

<body>
<dialog>Dialog in parent</dialog>

<iframe srcdoc="<input><dialog> Dialog in child </dialog>"></iframe>

<input>
<script>
test(() => {
window.onload = function() {
const iframe = document.querySelector("iframe");
const input = iframe.contentDocument.querySelector("input");
// <input> in the child document is focused
input.focus();

const dialog = document.querySelector("dialog");
// <dialog> in the parent document is opened
dialog.showModal();
dialog.close();

assert_equals(document.activeElement, iframe);
assert_equals(iframe.contentDocument.activeElement, input);
}
}, "Focus should move back from parent document to child document");

test(() => {
window.onload = function() {
const iframe = document.querySelector("iframe");
const input = document.querySelector("input");
// <input> in the parent document is focused
input.focus();

const dialog = iframe.contentDocument.querySelector("dialog");

// <dialog> in the child document is focused
dialog.showModal();
dialog.close();

assert_equals(document.activeElement, input);
}
}, "Focus should move back from child document to parent document");
</script>
</body>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><!-- webkit-test-runner [ RequestIdleCallbackEnabled=true ] -->
<!doctype html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<title>IdleDeadline::timeRemaining() uses relevant global object as a high-res timestamp origin</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,23 @@ validButUnsupportedConfigs.forEach(entry => {
});

validButUnsupportedConfigs.forEach(entry => {
async_test(
promise_test(
t => {
let isErrorCallbackCalled = false;
let codec = new AudioDecoder({
output: t.unreached_func('unexpected output'),
error: t.step_func_done(e => {
isErrorCallbackCalled = true;
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
})
});
codec.configure(entry.config);
codec.flush()
return codec.flush()
.then(t.unreached_func('flush succeeded unexpectedly'))
.catch(t.step_func(e => {
assert_true(isErrorCallbackCalled, "isErrorCallbackCalled");
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,23 @@ validButUnsupportedConfigs.forEach(entry => {
});

validButUnsupportedConfigs.forEach(entry => {
async_test(
promise_test(
t => {
let isErrorCallbackCalled = false;
let codec = new AudioEncoder({
output: t.unreached_func('unexpected output'),
error: t.step_func_done(e => {
isErrorCallbackCalled = true;
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
})
});
codec.configure(entry.config);
codec.flush()
return codec.flush()
.then(t.unreached_func('flush succeeded unexpectedly'))
.catch(t.step_func(e => {
assert_true(isErrorCallbackCalled, "isErrorCallbackCalled");
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,23 @@ validButUnsupportedConfigs.forEach(entry => {
});

validButUnsupportedConfigs.forEach(entry => {
async_test(
promise_test(
t => {
let isErrorCallbackCalled = false;
let codec = new VideoDecoder({
output: t.unreached_func('unexpected output'),
error: t.step_func_done(e => {
error: t.step_func(e => {
isErrorCallbackCalled = true;
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
})
});
codec.configure(entry.config);
codec.flush()
return codec.flush()
.then(t.unreached_func('flush succeeded unexpectedly'))
.catch(t.step_func(e => {
assert_true(isErrorCallbackCalled, "isErrorCallbackCalled");
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,23 @@ validButUnsupportedConfigs.forEach(entry => {
});

validButUnsupportedConfigs.forEach(entry => {
async_test(
promise_test(
t => {
let isErrorCallbackCalled = false;
let codec = new VideoEncoder({
output: t.unreached_func('unexpected output'),
error: t.step_func_done(e => {
isErrorCallbackCalled = true;
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
})
});
codec.configure(entry.config);
codec.flush()
return codec.flush()
.then(t.unreached_func('flush succeeded unexpectedly'))
.catch(t.step_func(e => {
assert_true(isErrorCallbackCalled, "isErrorCallbackCalled");
assert_true(e instanceof DOMException);
assert_equals(e.name, 'NotSupportedError');
assert_equals(codec.state, 'closed', 'state');
Expand Down

0 comments on commit 999b6da

Please sign in to comment.