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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html

Issue 2038773002: [Typed OM] Add an "UnsupportedStyleValue" in C++ that just has a string for unknown types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylevaue
Patch Set: Address comments about comments Created 4 years, 6 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/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_iteration-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
index 2335790b78119bbf78744f9726a67a23ba54d45e..6469832b4d7cba8552df91ac6ba6d44374b05ac3 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
@@ -34,6 +34,19 @@ test(function() {
}, 'Properties retrieved from ComputedStyleMap reflect the same values as from ComputedStyle');
test(function() {
+ testElement.style.border = '1px solid #00ff00';
+ var styleValue = computedStyleMap.get('border');
+ assert_equals(styleValue.constructor, CSSStyleValue);
+ assert_equals(styleValue.cssString, testElement.style.border);
+}, 'Unsupported but serializable property returns a base CSSStyleValue.');
+
+test(function() {
+ testElement.style.border = '';
+ testElement.style.borderBottomColor = 'green';
+ assert_equals(computedStyleMap.get('border'), null);
+}, 'Unsupported and unserializable property returns null.');
+
+test(function() {
assert_false(computedStyleMap.has('max-zoom'));
}, 'has() return false for an unsupported property.');
@@ -42,8 +55,15 @@ test(function() {
}, 'has() throws for an invalid property.');
test(function() {
+ testElement.style.border = '1px solid black';
+ assert_true(computedStyleMap.has('border'));
+}, 'has() returns true for an unsupported but serializable shorthand property.');
+
+test(function() {
+ testElement.style.border = '';
+ testElement.style.borderTopColor = 'red';
assert_false(computedStyleMap.has('border'));
-}, 'has() return false for unsupported shorthand properties.');
+}, 'has() return false for unsupported and unserializable shorthand properties.');
test(function() {
assert_true(computedStyleMap.has('width'));
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_iteration-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698