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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html

Issue 2227503002: Allow use of @apply and custom properties in InlineStylePropertyMap::getProperties() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra DCHECK Created 4 years, 4 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/core/css/cssom/InlineStylePropertyMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html
index e8a834f89abf0b6ca1b1ca463b2ded1d0734cbda..fb7226660ca2f509e1b90ac7825cb5dc8bb2c9d9 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html
@@ -40,9 +40,26 @@ test(function() {
testElement.styleMap.set('border-top-width', new CSSSimpleLength(10, 'px'));
var result = testElement.styleMap.getProperties();
// TODO(meade): The spec should describe an order for this.
- assert_equals(2, result.length, 2);
+ assert_equals(result.length, 2);
assert_true(result.indexOf('width') >= 0);
assert_true(result.indexOf('border-top-width') >= 0);
}, "getProperties returns multiple properties if they are set.");
+test(function() {
+ testElement.style = '';
+ testElement.style.setProperty('--my-custom-property', '5px');
+
+ assert_array_equals(testElement.styleMap.getProperties(), ['--my-custom-property']);
+}, "getProperties returns expected values for custom properties");
+
+test(function() {
+ testElement.style.cssText = "@apply --foo";
+ assert_array_equals(testElement.styleMap.getProperties(), ['@apply']);
+}, "getProperties returns expected values when @apply is used");
+
+test(function() {
+ testElement.style.cssText = "@apply --foo; @apply --bar;";
+ assert_array_equals(testElement.styleMap.getProperties(), ['@apply']);
+}, "getProperties returns only one @apply when multiple things are applied");
+
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698