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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements/global-attributes/dataset.html

Issue 2303013002: Add UMA metric to track usage of sending a mousedown to select elements. (Closed)
Patch Set: W3C auto test import CL. Created 4 years, 3 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/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>

Powered by Google App Engine
This is Rietveld 408576698