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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/variables/variables-in-at-rules.html

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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/variables/variables-in-at-rules.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/variables/variables-in-at-rules.html b/third_party/WebKit/LayoutTests/fast/css/variables/variables-in-at-rules.html
new file mode 100644
index 0000000000000000000000000000000000000000..b8f928387f5a73309115e403d9ac70b91c0aee7d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/variables/variables-in-at-rules.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+
+<style>
+@font-face {
+ --invalid-var: 1;
+}
+@viewport {
+ --invalid-var: 2;
+}
+@keyframes foo {
+ --invalid-var: 3;
+ 0% { --valid-var: 4; }
+ 100% { left: 10px; }
+}
+</style>
+
+<script>
+test(() => assert_equals(document.styleSheets[0].cssRules[0].cssText, "@font-face { }"),
+ "Custom properties are not allowed in @font-face rules");
+test(() => assert_equals(document.styleSheets[0].cssRules[1].cssText, "@viewport { }"),
+ "Custom properties are not allowed in @viewport rules");
+test(() => assert_equals(document.styleSheets[0].cssRules[2].cssText,
+`@keyframes foo {
+ 0% { --valid-var: 4; }
+ 100% { left: 10px; }
+}`), "Custom properties are not allowed in the outer scope of @keyframes rules");
+</script>

Powered by Google App Engine
This is Rietveld 408576698