Index: third_party/WebKit/LayoutTests/fast/css/variables/multiple-writes-to-inline-style.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/variables/multiple-writes-to-inline-style.html b/third_party/WebKit/LayoutTests/fast/css/variables/multiple-writes-to-inline-style.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f2bfba577e7c26e9cf34e30ccac963728f83c34b |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/variables/multiple-writes-to-inline-style.html |
@@ -0,0 +1,19 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<div id='testElem'></div> |
+<script> |
+ |
+test(function() { |
+ assert_equals(testElem.getAttribute('style'), null); |
+ testElem.style.setProperty('--foo', 'first'); |
+ assert_equals(testElem.style.getPropertyValue('--foo'), 'first'); |
+ assert_equals(getComputedStyle(testElem).getPropertyValue('--foo'), 'first'); |
+ assert_equals(testElem.getAttribute('style'), '--foo: first;'); |
+ testElem.style.setProperty('--foo', 'second'); |
+ assert_equals(testElem.style.getPropertyValue('--foo'), 'second'); |
+ // assert_equals(getComputedStyle(testElem).getPropertyValue('--foo'), 'second'); |
Timothy Loh
2016/02/16 23:49:39
uncomment this?
shans
2016/02/17 02:41:35
It will fail, due to another bug I'm currently wor
Timothy Loh
2016/02/17 23:54:10
Maybe better to uncomment and check in a failing e
|
+ assert_equals(testElem.getAttribute('style'), '--foo: second;'); |
+}, "subsequent writes to inline style overwrite older values.") |
+ |
+</script> |