| Index: third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_delete.html
|
| diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_delete.html b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_delete.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b5a8889e10b0edcf70d2a10be962705188f1e06c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap_delete.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +
|
| +<div id="testElement"></div>
|
| +
|
| +<script>
|
| +
|
| +// Delete
|
| +test(function() {
|
| + testElement.style.width = '80px';
|
| + assert_equals('80px', testElement.styleMap.get('width').cssString);
|
| +
|
| + testElement.styleMap.delete('width');
|
| + assert_equals(null, testElement.styleMap.get('width'));
|
| + assert_equals('', testElement.style.width);
|
| +}, "delete() removes the value from the property");
|
| +
|
| +test(function() {
|
| + assert_equals(null, testElement.styleMap.get('height'));
|
| + testElement.styleMap.delete('height');
|
| + assert_equals(null, testElement.styleMap.get('height'));
|
| +}, "delete() does nothing if the property isn't set");
|
| +
|
| +test(function() {
|
| + assert_throws(new TypeError(), function() {
|
| + testElement.styleMap.delete('lemons');
|
| + });
|
| +}, "Attempting to delete an invalid property throws");
|
| +
|
| +</script>
|
|
|