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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/variables/accessing-variable-as-named-property.html

Issue 2308373002: Fix assertion when trying to set custom properties as named properties (Closed)
Patch Set: Created 4 years, 3 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
« 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/css/variables/accessing-variable-as-named-property.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/variables/accessing-variable-as-named-property.html b/third_party/WebKit/LayoutTests/fast/css/variables/accessing-variable-as-named-property.html
new file mode 100644
index 0000000000000000000000000000000000000000..8cdeea5ced5ed23c1a879ccc618d628adde5baac
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/variables/accessing-variable-as-named-property.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<meta charset="UTF-8">
+
+<div id="div"></div>
+
+<script>
+test(function() {
+ assert_equals(div.style["--foo"], undefined);
+ div.style = "--foo: 10px";
+ assert_equals(div.style["--foo"], undefined);
+ div.style["--foo"] = "20px";
+ assert_equals(div.style["--foo"], "20px");
+ assert_equals(div.style.getPropertyValue("--foo"), " 10px");
+}, "Custom properties can't be accessed as named properties on style object");
+</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