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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-invalid-cycles.html

Issue 1645433002: Basic implementation of @apply (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix expted.txt for failing test Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <style>
5 #e {
6 width: 100px;
7 height: 100px;
8 background-color: green;
9 --a1: { @apply --a2; background-color: red; };
10 --a2: { @apply --a1; background-color: red; };
11 @apply --a1;
12 @apply --a2;
13 --b1: { @apply --b2; background-color: red; };
14 --b2: var(--b3);
15 --b3: { var(--b1, background-color: red); };
16 @apply --b1;
17 @apply --b2;
18 @apply --b3;
19 }
20 </style>
21 <div id=e>
22 </div>
23 <script>
24 test(function(){
25 assert_equals(getComputedStyle(e).backgroundColor, "rgb(0, 128, 0)");
26 assert_equals(getComputedStyle(e).getPropertyValue("--a1"), "");
27 assert_equals(getComputedStyle(e).getPropertyValue("--a2"), "");
28 assert_equals(getComputedStyle(e).getPropertyValue("--b1"), "");
29 assert_equals(getComputedStyle(e).getPropertyValue("--b2"), "");
30 assert_equals(getComputedStyle(e).getPropertyValue("--b3"), "");
31 }, "Variable cycle detection works with @apply");
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698