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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/css-style-attribute-modifications.html

Issue 2800723002: Ensure we never remove the style attribute when syncing it from CSSOM. (Closed)
Patch Set: Nits Created 3 years, 8 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/css-style-attribute-modifications.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/css-style-attribute-modifications.html b/third_party/WebKit/LayoutTests/fast/css/css-style-attribute-modifications.html
new file mode 100644
index 0000000000000000000000000000000000000000..10a9616d2031989f05c254d21657b4470c11e2b7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/css-style-attribute-modifications.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecobos@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div id="test" style="color: red"></div>
+<script>
+test(function() {
+ var el = document.getElementById("test");
+ el.style.color = "";
+ assert_true(el.hasAttribute("style"));
+
+ el.removeAttribute("style");
+ assert_false(el.hasAttribute("style"));
+}, "Mutating the style declaration doens't remove the style attribute");
+</script>

Powered by Google App Engine
This is Rietveld 408576698