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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/custom/attribute-changed-callback.html

Issue 1446933002: Queue Custom Element attribute changes arising from style mutations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/custom/attribute-changed-callback.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/custom/attribute-changed-callback.html b/third_party/WebKit/LayoutTests/fast/dom/custom/attribute-changed-callback.html
index 195b1ae4e597a320827dba4864a67a48ddb4fd26..cef755d67081a5b5f4062923a67e00df2bf5be01 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/custom/attribute-changed-callback.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/custom/attribute-changed-callback.html
@@ -71,5 +71,25 @@ test(function () {
invocations = [];
b.setAttribute('data-v', 'x');
assert_array_equals(invocations, [], 'setting an attribute to the existing value with setAttribute should not invoke the attributeChangedCallback');
+
+ invocations = [];
+ b.style.color = 'red';
+ assert_array_equals(invocations, ['style: null => color: red;'], 'changing an attribute with the styles object\'s named setter should invoke the attributeChangedCallback');
+
+ invocations = [];
+ b.style.color = '';
+ assert_array_equals(invocations, ['style: color: red; => null'], 'changing an attribute with the styles object\'s named setter should invoke the attributeChangedCallback');
+
+ invocations = [];
+ b.style.cssText = 'color: pink;';
+ assert_array_equals(invocations, ['style: null => color: pink;'], 'changing an attribute with the styles object\'s cssText setter should invoke the attributeChangedCallback');
+
+ invocations = [];
+ b.style.setProperty('color', 'red');
+ assert_array_equals(invocations, ['style: color: pink; => color: red;'], 'changing an attribute with the styles object\'s setProperty method should invoke the attributeChangedCallback');
+
+ invocations = [];
+ b.style.removeProperty('color');
+ assert_array_equals(invocations, ['style: color: red; => null'], 'changing an attribute with the styles object\'s removeProperty method should invoke the attributeChangedCallback');
}, 'add, change and remove an attribute');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698