-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@d81f04acd4371d2939c7a30a090c9af913165874
Using wpt-import in Chromium a0721c8. With Chromium commits locally applied on WPT: 02f17c4 "Fix dialog focusing steps for disconnected dialog" 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 Directory owners for changes in this CL: rego@igalia.com: external/wpt/css/selectors NOAUTOREVERT=true R=rubber-stamper@appspot.gserviceaccount.com No-Export: true Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel,linux-blink-rel Change-Id: Ib7141e0e557ba76768e114d8f96a0e39db8db9c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3635440 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1001233}
- Loading branch information
Chromium WPT Sync
authored and
Chromium LUCI CQ
committed
May 9, 2022
1 parent
bc8e3dd
commit a73a6cc
Showing
6 changed files
with
180 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Version: 2bc981110402ce8c1e21b6a70d7fdb00518ee748 | ||
Version: d81f04acd4371d2939c7a30a090c9af913165874 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ty/blink/web_tests/external/wpt/css/selectors/invalidation/modal-pseudo-class-in-has.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8" /> | ||
<title>CSS Selectors Invalidation: :modal pseudo class in :has()</title> | ||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<style> | ||
#subject:has(#dialog:modal) { color: green } | ||
</style> | ||
<div id="subject"> | ||
This is some text. | ||
<dialog id="dialog">This is a dialog</dialog> | ||
</div> | ||
<script> | ||
test(function() { | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 0, 0)", | ||
"ancestor should be black since dialog is not modal"); | ||
dialog.show(); | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 0, 0)", | ||
"ancestor should be black since dialog is not modal"); | ||
dialog.close(); | ||
}, ":modal pseudo-class is not active with dialog.show()"); | ||
test(function() { | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 0, 0)", | ||
"ancestor should be black"); | ||
dialog.showModal(); | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 128, 0)", | ||
"ancestor should be green since dialog is shown modally"); | ||
dialog.close(); | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 0, 0)", | ||
"ancestor should be black since dialog is closed"); | ||
}, ":modal pseudo-class invalidation with showModal+close"); | ||
test(function() { | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 0, 0)", | ||
"ancestor should be black"); | ||
dialog.showModal(); | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 128, 0)", | ||
"ancestor should be green since dialog is shown modally"); | ||
dialog.remove(); | ||
assert_equals(getComputedStyle(subject).color, "rgb(0, 0, 0)", | ||
"ancestor should be black since dialog is closed"); | ||
}, ":modal pseudo-class invalidation with showModal+remove"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...rm/generic/external/wpt/css/selectors/invalidation/modal-pseudo-class-in-has-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
PASS :modal pseudo-class is not active with dialog.show() | ||
FAIL :modal pseudo-class invalidation with showModal+close assert_equals: ancestor should be green since dialog is shown modally expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" | ||
FAIL :modal pseudo-class invalidation with showModal+remove Failed to execute 'showModal' on 'HTMLDialogElement': The element already has an 'open' attribute, and therefore cannot be opened modally. | ||
Harness: the test ran to completion. | ||
|
4 changes: 4 additions & 0 deletions
4
...wpt/html/semantics/interactive-elements/the-dialog-element/dialog-show-modal-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a testharness.js-based test. | ||
FAIL Tests that showModal() performs the steps specified in the HTML spec. Failed to execute 'matches' on 'Element': ':modal' is not a valid selector. | ||
Harness: the test ran to completion. | ||
|