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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-in-inline-style.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, 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-in-inline-style.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-in-inline-style.html b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-in-inline-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..01a55c64461e4b939f4b54ffe0d3c74646ced2eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-in-inline-style.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ --foo: {
+ background-color: green;
+ }
+}
+</style>
+<div id=e1 style="@apply --foo"></div>
+<div id=e2 style="@apply --foo; height: 100px"></div>
+<script>
+test(function(){
+ assert_equals(getComputedStyle(e1).backgroundColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(e2).backgroundColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(e2).height, "100px");
+}, "@apply should work when specified inside inline styles");
+</script>

Powered by Google App Engine
This is Rietveld 408576698