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

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

Issue 1849653003: Implement ComputedStylePropertyMap for Typed OM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps-inline
Patch Set: Update global-interface-listing Created 4 years, 9 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/computedstyle/computedStylePropertyMap.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
new file mode 100644
index 0000000000000000000000000000000000000000..5a9cd60af8c60beb6e515319530d61f8f3be2271
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/computedstyle/computedStylePropertyMap.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src='../../resources/testharness.js'></script>
+<script src='../../resources/testharnessreport.js'></script>
+
+<div id="testElement"></div>
+
+<script>
+
+var computedStyleMap = getComputedStyleMap(testElement);
+var computedStyle = getComputedStyle(testElement);
+
+test(function() {
+ var properties = computedStyleMap.getProperties();
+
+ assert_equals(computedStyle.length, properties.length);
+}, "Computed StyleMap.getProperties returns the same number of properties as ComputedStyle");
+
+test(function() {
+ var properties = computedStyleMap.getProperties();
+ for (var i = 0; i < properties.length; i++) {
+ var property = properties[i];
+ var styleValues = computedStyleMap.getAll(property);
+ if (styleValues.length == 1) {
+ // TODO(meade): Remove this if statement once all properties are supported.
+ // TODO(meade): Handle sequence types.
+ assert_equals(computedStyle[property], computedStyleMap.get(property).cssString);
+ }
+ }
+}, 'Properties retrieved from ComputedStyleMap reflect the same values as from ComputedStyle');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698