| 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>
|
|
|