Skip to content

Commit

Permalink
Remove subtests depending on non-substitution attr()
Browse files Browse the repository at this point in the history
Content property parser depends on attr()'s substitution value, so the
tests are not valid anymore.

Bug: 40320391
Change-Id: I43e3fdb9645838e915485b69a313143185376da7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088424
Commit-Queue: Munira Tursunova <[email protected]>
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1395442}
  • Loading branch information
tursunova authored and chromium-wpt-export-bot committed Dec 12, 2024
1 parent d534e0a commit 5c0247d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
7 changes: 0 additions & 7 deletions css/css-content/parsing/content-invalid.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
function test_invalid_value_combinations(property, value) {
test_invalid_value(property, value);
test_invalid_value(property, `${value} / "alt text"`);
test_invalid_value(property, `${value} / "alt text" attr(foo) "bar"`);
test_invalid_value(property, `${value} / attr(foo)`);
}

function test_invalid_value_alt_text(property, value) {
test_invalid_value(property, `${value} / url("https://www.example.com/picture.svg")`);
test_invalid_value(property, `${value} / no-open-quote`);
test_invalid_value(property, `${value} / no-close-quote`);
test_invalid_value(property, `${value} / "hi" no-close-quote`);
test_invalid_value(property, `${value} / attr(foo) open-quote`);
}

test_invalid_value_combinations("content", `attr()`);
Expand All @@ -36,9 +33,6 @@
test_invalid_value_alt_text("content", "no-open-quote");
test_invalid_value_alt_text("content", "no-close-quote");

test_invalid_value_alt_text("content", "attr(alt)");
test_invalid_value_alt_text("content", "attr(data-foo)");

test_invalid_value_alt_text("content", "counter(counter-name)");
test_invalid_value_alt_text("content", "counter(counter-name, counter-style)");

Expand All @@ -50,7 +44,6 @@
test_invalid_value_alt_text("content", `"hello"`);

test_invalid_value_alt_text("content", `"hello" "world"`);
test_invalid_value_alt_text("content", `"hello" attr(alt) "world"`);
test_invalid_value_alt_text("content", `counter(counter-name) "potato"`);
test_invalid_value_alt_text("content", `counters(counter-name, ".") "potato"`);
test_invalid_value_alt_text("content", `"(" counters(counter-name, ".", counter-style) ")"`);
Expand Down
6 changes: 0 additions & 6 deletions css/css-content/parsing/content-valid.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
serialized = value;
test_valid_value(property, value, serialized);
test_valid_value(property, `${value} / "alt text"`, `${serialized} / "alt text"`);
test_valid_value(property, `${value} / "alt text" attr(foo) "bar"`, `${serialized} / "alt text" attr(foo) "bar"`);
test_valid_value(property, `${value} / attr(foo)`, `${serialized} / attr(foo)`);
}

test_valid_value("content", "none");
Expand All @@ -29,9 +27,6 @@
test_valid_value_combinations("content", "no-open-quote");
test_valid_value_combinations("content", "no-close-quote");

test_valid_value_combinations("content", "attr(alt)");
test_valid_value_combinations("content", "attr(data-foo)");

test_valid_value_combinations("content", "counter(counter-name)");
test_valid_value_combinations("content", "counter(counter-name, counter-style)");
test_valid_value_combinations("content", "counter(counter-name, dECiMaL)", "counter(counter-name)");
Expand All @@ -47,7 +42,6 @@
test_valid_value_combinations("content", `"hello"`);

test_valid_value_combinations("content", `"hello" "world"`);
test_valid_value_combinations("content", `"hello" attr(alt) "world"`);
test_valid_value_combinations("content", `counter(counter-name) "potato"`);
test_valid_value_combinations("content", `counters(counter-name, ".") "potato"`);
test_valid_value_combinations("content", `"(" counters(counter-name, ".", counter-style) ")"`);
Expand Down
2 changes: 1 addition & 1 deletion css/cssom/serialize-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
function attr_fallback() {
var values = ['attr(foo-bar, "fallback")', 'attr(foo_bar, "fallback")',
{actual: 'attr(|bar, "fallback")', serialized: 'attr(bar, "fallback")'},
{actual: 'attr(foo, "")', serialized: 'attr(foo)'},
{actual: 'attr(foo, "")', serialized: 'attr(foo, "")'},
{actual: 'attr( |foo , "" )', serialized: 'attr(foo)'}];
return iterable(values);
}
Expand Down

0 comments on commit 5c0247d

Please sign in to comment.