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

Side by Side Diff: LayoutTests/fast/dom/serialize-nodes.xhtml

Issue 1158433004: Remove Attr child nodes (making Attr a Node, not a ContainerNode) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address feedback Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/ DTD/xhtml11.dtd"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/ DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:foo="http://foo.com" xmlns:bar= "http://bar.com" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:foo="http://foo.com" xmlns:bar= "http://bar.com" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5 <title>XMLSerializer() namespace test</title> 5 <title>XMLSerializer() namespace test</title>
6 <script> 6 <script>
7 window.addEventListener("load", function() { 7 window.addEventListener("load", function() {
8 if (window.testRunner) 8 if (window.testRunner)
9 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 var root = d.documentElement; 22 var root = d.documentElement;
23 root.setAttributeNS("urn:foo-ns", "foo:type", "test") 23 root.setAttributeNS("urn:foo-ns", "foo:type", "test")
24 24
25 var c = d.createElementNS(null, "child"); 25 var c = d.createElementNS(null, "child");
26 root.appendChild(c); 26 root.appendChild(c);
27 27
28 c.setAttributeNS("urn:foo-ns", "foo:name", "one"); 28 c.setAttributeNS("urn:foo-ns", "foo:name", "one");
29 c.setAttributeNS("urn:bar-ns", "bar:name", "two"); 29 c.setAttributeNS("urn:bar-ns", "bar:name", "two");
30 var attr = d.createAttributeNS(null, "name"); 30 var attr = d.createAttributeNS(null, "name");
31 var text = d.createTextNode("three"); 31 attr.value = "three";
32 attr.appendChild(text);
33 c.setAttributeNode(attr); 32 c.setAttributeNode(attr);
34 33
35 window.alert("foo:name is " + c.getAttributeNS("urn:foo-ns", "name") + " and should be one"); 34 window.alert("foo:name is " + c.getAttributeNS("urn:foo-ns", "name") + " and should be one");
36 window.alert("bar:name is " + c.getAttributeNS("urn:bar-ns", "name") + " and should be two"); 35 window.alert("bar:name is " + c.getAttributeNS("urn:bar-ns", "name") + " and should be two");
37 window.alert("name is " + c.getAttributeNS(null, "name") + " and should be t hree"); 36 window.alert("name is " + c.getAttributeNS(null, "name") + " and should be t hree");
38 window.alert("node is " + d.getElementsByTagNameNS(null, "child").item(0).no deName + " and should be child"); 37 window.alert("node is " + d.getElementsByTagNameNS(null, "child").item(0).no deName + " and should be child");
39 window.alert(xs.serializeToString(d)); 38 window.alert(xs.serializeToString(d));
40 }, false); 39 }, false);
41 </script> 40 </script>
42 </head> 41 </head>
43 <body> 42 <body>
44 <pre id="content">foo</pre> 43 <pre id="content">foo</pre>
45 <div id="input"> 44 <div id="input">
46 <div> 45 <div>
47 <foo:node xmlns="http://baz.com" foo:name="foo_name" bar:name="bar_name" > 46 <foo:node xmlns="http://baz.com" foo:name="foo_name" bar:name="bar_name" >
48 <node foo:name="foo_name"> 47 <node foo:name="foo_name">
49 <bar:node xmlns:bar="http://bar2.com"/> 48 <bar:node xmlns:bar="http://bar2.com"/>
50 </node> 49 </node>
51 </foo:node> 50 </foo:node>
52 </div> 51 </div>
53 <bar:node> 52 <bar:node>
54 <br /> 53 <br />
55 </bar:node> 54 </bar:node>
56 </div> 55 </div>
57 </body> 56 </body>
58 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698