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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/name-validity-usecounter.html

Issue 2838123002: Count element name validity per DOM versus HTML parsing. (Closed)
Patch Set: Do not need the attribute counting. Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/name-validity-usecounter.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/name-validity-usecounter.html b/third_party/WebKit/LayoutTests/fast/dom/name-validity-usecounter.html
new file mode 100644
index 0000000000000000000000000000000000000000..f529927d7167a7fd819857a5b647a3a8b1254a0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/name-validity-usecounter.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<body>
+<script>
+'use strict';
+
+const kElementNameDOMInvalidHTMLParserValid = 1968;
+const kElementNameDOMValidHTMLParserInvalid = 1969;
+
+test(() => {
+ assert_false(internals.isUseCounted(document, kElementNameDOMInvalidHTMLParserValid),
+ 'element name: DOM invalid, HTML valid');
+ assert_false(internals.isUseCounted(document, kElementNameDOMValidHTMLParserInvalid),
+ 'element name: DOM valid, HTML invalid');
+ assert_throws('InvalidCharacterError', () => document.createElement('foo"'));
+ assert_true(internals.isUseCounted(document, kElementNameDOMInvalidHTMLParserValid),
+ 'element name: DOM invalid, HTML valid');
+ assert_false(internals.isUseCounted(document, kElementNameDOMValidHTMLParserInvalid),
+ 'element name: DOM valid, HTML invalid');
+
+ document.createElement(':foo');
+ assert_true(internals.isUseCounted(document, kElementNameDOMValidHTMLParserInvalid),
+ 'element name: DOM valid, HTML invalid');
+}, 'name validity failures tickle use counters');
+</script>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698