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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createAttribute.html

Issue 1529523002: Import dom/ from web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak W3CImportExpectations Created 5 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset=utf-8>
3 <title>Document.createAttribute</title>
4 <script src=../../../../resources/testharness.js></script>
5 <script src=../../../../resources/testharnessreport.js></script>
6 <script src=attributes.js></script>
7 <script src=productions.js></script>
8 <div id=log>
9 <script>
10 var xml_document;
11 setup(function() {
12 xml_document = document.implementation.createDocument(null, null, null);
13 });
14
15 invalid_names.forEach(function(name) {
16 test(function() {
17 assert_throws("INVALID_CHARACTER_ERR", function() {
18 document.createAttribute(name, "test");
19 });
20 }, "HTML document.createAttribute(" + format_value(name) + ")");
21
22 test(function() {
23 assert_throws("INVALID_CHARACTER_ERR", function() {
24 xml_document.createAttribute(name, "test");
25 });
26 }, "XML document.createAttribute(" + format_value(name) + ")");
27 });
28
29 var tests = ["title", "TITLE", null, undefined];
30 tests.forEach(function(name) {
31 test(function() {
32 var attribute = document.createAttribute(name);
33 attr_is(attribute, "", String(name).toLowerCase(), null, null, String(name). toLowerCase());
34 assert_equals(attribute.ownerElement, null);
35 }, "HTML document.createAttribute(" + format_value(name) + ")");
36
37 test(function() {
38 var attribute = xml_document.createAttribute(name);
39 attr_is(attribute, "", String(name), null, null, String(name));
40 assert_equals(attribute.ownerElement, null);
41 }, "XML document.createAttribute(" + format_value(name) + ")");
42 });
43 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698