Skip to content

Commit

Permalink
Add Web Platform tests for SVGUseElement
Browse files Browse the repository at this point in the history
This CL adds WPT for URLs supported in SVGUseElement.
See: w3c/svgwg#901

But: 1300195
Change-Id: Ieab699fc167b254c65b92ed811756404dcc7c575
  • Loading branch information
shhnjk authored and chromium-wpt-export-bot committed Dec 16, 2022
1 parent a21d094 commit 81591e9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
3 changes: 3 additions & 0 deletions svg/struct/reftests/support/red-rect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions svg/struct/reftests/use-cross-origin.svg
Loading
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 svg/struct/reftests/use-data-url.tentative.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions svg/struct/reftests/use-same-origin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions svg/struct/scripted/use-load-error-events.tentative.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
promise_test(t => {
const svg = document.querySelector('svg');
const use = newUseElement();
const watcher = expectEvents(t, use, ['load']);
const watcher = expectEvents(t, use, ['error']);
const url = getUrl('existing-data');
svg.appendChild(use).setAttribute('href', url);
return watcher;
Expand Down Expand Up @@ -106,15 +106,16 @@
return makeWatcher(svg, 'load', url);
}, document.title + ', external reference, existing, changed to local reference while loading');

promise_test(t => {
/*promise_test(t => {
const svg = document.querySelector('svg');
const use = newUseElement();
expectEvents(t, use, []);
const url = getUrl('existing-data');
svg.appendChild(use).setAttribute('href', url);
t.step_timeout(() => use.setAttribute('href', '#local'));
return makeWatcher(svg, 'load', url);
}, document.title + ', external data: URL reference, existing, changed to local reference while loading');
// t.step_timeout(() => use.setAttribute('href', '#local'));
// makeWatcher(svg, 'load', url);
return new Promise(resolve => t.step_timeout(resolve, 1000));
}, document.title + ', external data: URL reference, existing, changed to local reference while loading');*/

promise_test(t => {
const svg = document.querySelector('svg');
Expand Down

0 comments on commit 81591e9

Please sign in to comment.