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

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 if statement 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
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..fd0d96f436ce66a979851e76212669dd47bea0ce 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_getProperties.html
@@ -40,9 +40,21 @@ 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");
+
</script>

Powered by Google App Engine
This is Rietveld 408576698