| Index: third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements/global-attributes/dataset.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements/global-attributes/dataset.html b/third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements/global-attributes/dataset.html
|
| index fe3e032d52897e986d4cbe0050a893834dd7db25..a4a16d014d9b6de9c5fa5523a0fc11b801383931 100644
|
| --- a/third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements/global-attributes/dataset.html
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements/global-attributes/dataset.html
|
| @@ -1,5 +1,5 @@
|
| <!DOCTYPE html>
|
| -<title>dataset: should return 'undefined' for non-existent properties</title>
|
| +<title>dataset: should exist and work on HTML and SVG elements, but not random elements</title>
|
| <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
| <script src="/resources/testharness.js"></script>
|
| <script src="/resources/testharnessreport.js"></script>
|
| @@ -7,6 +7,9 @@
|
| <script>
|
| var div = document.createElement("div");
|
| test(function() {
|
| + assert_true(div.dataset instanceof DOMStringMap);
|
| +}, "HTML elements should have a .dataset");
|
| +test(function() {
|
| assert_false("foo" in div.dataset);
|
| assert_equals(div.dataset.foo, undefined);
|
| }, "Should return 'undefined' before setting an attribute")
|
| @@ -25,4 +28,11 @@ test(function() {
|
| assert_false("foo" in div.dataset);
|
| assert_equals(div.dataset.foo, undefined);
|
| }, "Should return 'undefined' after removing an attribute")
|
| +test(function() {
|
| + assert_equals(document.createElementNS("test", "test").dataset, undefined);
|
| +}, "Should not have a .dataset on random elements");
|
| +test(function() {
|
| + var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg")
|
| + assert_true(svg.dataset instanceof DOMStringMap);
|
| +}, "SVG elements should have a .dataset");
|
| </script>
|
|
|