Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@cd26ed81191bad4f548128a092a825a25d00de3a
Using wpt-import in Chromium ffd99f4. With Chromium commits locally applied on WPT: 30c99b3 "Support replaced content in repeated (NG) table sections." 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 Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-input-fyi-rel,linux-blink-rel Change-Id: Ic1d79920766f45dc37cff2aac963f414117f2d35 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3826925 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1034455}
- Loading branch information
Chromium WPT Sync
authored and
Chromium LUCI CQ
committed
Aug 12, 2022
1 parent
f4ae5be
commit eb7c75f
Showing
7 changed files
with
237 additions
and
3 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
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: f1ef84ca14e9e7f18d82544dfa2191ccab027757 | ||
Version: cd26ed81191bad4f548128a092a825a25d00de3a |
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
91 changes: 91 additions & 0 deletions
91
third_party/blink/web_tests/external/wpt/resize-observer/svg-with-css-box-001.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,91 @@ | ||
<!doctype html> | ||
<title>ResizeObserver for SVG elements with CSS box.</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="./resources/resizeTestHelper.js"></script> | ||
<div id="container" style="width: 500px; height: 500px;"> | ||
<svg id="svg" width="100%" viewBox="0 0 100 100"> | ||
<circle cx="50" cy="50" r="45" style="fill:orange;stroke:black;stroke-width:1" /> | ||
<foreignObject id="foreign" x="0" y="0" width="100" height="100"> | ||
<svg xmlns="http://www.w3.org/2000/svg" | ||
width="100%" height="100%" | ||
viewBox="0 0 100 100" | ||
id="foreign-svg"> | ||
<circle cx="50" cy="50" r="45" style="fill:orange;stroke:black;stroke-width:1" /> | ||
</svg> | ||
</foreignObject> | ||
</svg> | ||
<script> | ||
'use strict'; | ||
|
||
function test0() { | ||
let targetWidth = 150; | ||
let target = document.getElementById('foreign-svg'); | ||
let container = document.getElementById('foreign'); | ||
let helper = new ResizeTestHelper( | ||
"test0: observe `foreignObject` SVG in HTML document", | ||
[ | ||
{ | ||
setup: observer => { | ||
observer.observe(target); | ||
}, | ||
notify: (entries, observer) => { | ||
return true; // Delay next step | ||
} | ||
}, | ||
{ | ||
setup: observer => { | ||
target.setAttribute('width', targetWidth); | ||
}, | ||
notify: entries => { | ||
assert_equals(entries.length, 1); | ||
const entry = entries[0]; | ||
assert_equals(entry.target, target); | ||
assert_equals(entry.contentBoxSize[0].inlineSize, targetWidth); | ||
}, | ||
} | ||
]); | ||
return helper.start(); | ||
} | ||
|
||
function test1() { | ||
let targetWidth = 400; | ||
let target = document.getElementById('svg'); | ||
let container = document.getElementById('container'); | ||
let helper = new ResizeTestHelper( | ||
"test1: observe inline SVG in HTML", | ||
[ | ||
{ | ||
setup: observer => { | ||
observer.observe(target); | ||
}, | ||
notify: (entries, observer) => { | ||
return true; // Delay next step | ||
} | ||
}, | ||
{ | ||
setup: observer => { | ||
target.style.width = targetWidth + 'px'; | ||
}, | ||
notify: (entries, observer) => { | ||
assert_equals(entries.length, 1); | ||
const entry = entries[0]; | ||
assert_equals(entry.target, target); | ||
assert_equals(entry.contentBoxSize[0].inlineSize, targetWidth); | ||
} | ||
} | ||
]); | ||
return helper.start(); | ||
} | ||
|
||
let guard; | ||
test(_ => { | ||
assert_implements(window.ResizeObserver); | ||
guard = async_test('guard'); | ||
}, "ResizeObserver implemented") | ||
|
||
test0() | ||
.then(() => { test1(); }) | ||
.then(() => { guard.done(); }); | ||
|
||
</script> |
94 changes: 94 additions & 0 deletions
94
third_party/blink/web_tests/external/wpt/resize-observer/svg-with-css-box-002.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
...web_tests/platform/generic/external/wpt/resize-observer/svg-with-css-box-001-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,7 @@ | ||
This is a testharness.js-based test. | ||
PASS ResizeObserver implemented | ||
PASS guard | ||
FAIL test0: observe `foreignObject` SVG in HTML document assert_unreached: Timed out waiting for notification. (1000ms) Reached unreachable code | ||
FAIL test1: observe inline SVG in HTML assert_unreached: Timed out waiting for notification. (1000ms) Reached unreachable code | ||
Harness: the test ran to completion. | ||
|
7 changes: 7 additions & 0 deletions
7
...web_tests/platform/generic/external/wpt/resize-observer/svg-with-css-box-002-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,7 @@ | ||
This is a testharness.js-based test. | ||
PASS ResizeObserver implemented | ||
PASS guard | ||
FAIL test0: Root SVG resize observed assert_unreached: Timed out waiting for notification. (1000ms) Reached unreachable code | ||
FAIL test1: `foreignObject` SVG resize observed assert_unreached: Timed out waiting for notification. (1000ms) Reached unreachable code | ||
Harness: the test ran to completion. | ||
|