Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html

Issue 1752773003: Check @apply syntax in custom properties declarations at parse time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html
index 1cbf1e4f9c5be3442dd886fb2f24a46bd56e015b..a578ce416c67d06c5f7bbcf1eba306fa50c8d7f7 100644
--- a/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html
+++ b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-syntax.html
@@ -24,6 +24,12 @@
--red2: { background-color: red; } bla ;
@apply --red2;
+ --var1: @apply;
+ --var2: @apply foo;
+ --var3: @apply --red :/ ;
+ --var4: @apply --red @apply --red;
+ --var5: @apply --red {;
+
width: 100px;
height: 100px;
@@ -43,5 +49,10 @@
<script>
test(function(){
assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(e).getPropertyValue("--var1"), "");
+ assert_equals(getComputedStyle(e).getPropertyValue("--var2"), "");
+ assert_equals(getComputedStyle(e).getPropertyValue("--var3"), "");
+ assert_equals(getComputedStyle(e).getPropertyValue("--var4"), "");
+ assert_equals(getComputedStyle(e).getPropertyValue("--var5"), "");
}, "Tests various invalid @apply rules get rejected");
</script>

Powered by Google App Engine
This is Rietveld 408576698