| Index: third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html
|
| diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a69db093f3b9d8ed9d91083b3e49d06c2d7b1eab
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_getAll.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +
|
| +<div id="testElement"></div>
|
| +
|
| +<script>
|
| +
|
| +// getAll
|
| +test(function() {
|
| + // TODO(meade): Add a test case for a property with multiple values when that is supported.
|
| + testElement.styleMap.set('width', new SimpleLength(90, 'px'));
|
| + var result = testElement.styleMap.getAll('width');
|
| + assert_equals(1, result.length);
|
| + assert_equals('90px', result[0].cssString);
|
| +}, "getAll() returns a list of values");
|
| +
|
| +test(function() {
|
| + assert_array_equals([], testElement.styleMap.getAll('height'));
|
| +}, "getAll() returns an empty list if the property isn't set");
|
| +
|
| +test(function() {
|
| + assert_throws(new TypeError(), function() {
|
| + testElement.styleMap.getAll('lemons');
|
| + });
|
| +}, "getAll() throws if you try to get an invalid property");
|
| +
|
| +</script>
|
|
|