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

Side by Side Diff: third_party/WebKit/LayoutTests/dom/domparsing/xmlserializer-attribute-namespace.html

Issue 2667303004: Move tests for DOMParser and XMLSerializer to dom/domparsing/. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <script> 3 <script>
4 description('Tests the serialization of XML namespaces on attributes, as reporte d in <a href="http://crbug.com/248044">bug 248044</a>.'); 4 description('Tests the serialization of XML namespaces on attributes, as reporte d in <a href="http://crbug.com/248044">bug 248044</a>.');
5 window.doc = (new DOMParser()).parseFromString('<outer attr1="value1" xmlns="htt p://www.example.com"/>', 'text/xml'); 5 window.doc = (new DOMParser()).parseFromString('<outer attr1="value1" xmlns="htt p://www.example.com"/>', 'text/xml');
6 // XML-namespaced attributes should get the "xml" prefix. 6 // XML-namespaced attributes should get the "xml" prefix.
7 doc.documentElement.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'id', 'outer'); 7 doc.documentElement.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'id', 'outer');
8 // Attributes with the same namespace as the element should get a prefix. 8 // Attributes with the same namespace as the element should get a prefix.
9 doc.documentElement.setAttributeNS('http://www.example.com', 'foo', 'bar'); 9 doc.documentElement.setAttributeNS('http://www.example.com', 'foo', 'bar');
10 doc.documentElement.setAttributeNS('http://www.example.com', 'foo2', 'bar2'); 10 doc.documentElement.setAttributeNS('http://www.example.com', 'foo2', 'bar2');
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com", "fo o2")', '"bar2"'); 45 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com", "fo o2")', '"bar2"');
46 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz")', '"buzz"'); 46 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz")', '"buzz"');
47 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz2")', '"buzz2"'); 47 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz2")', '"buzz2"');
48 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns2", "name")', '"value"'); 48 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns2", "name")', '"value"');
49 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns2", "name2")', '"value2"'); 49 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns2", "name2")', '"value2"');
50 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.w3.org/XML/1998/n amespace", "id")', '"outer"'); 50 shouldBe('parsedDoc.documentElement.getAttributeNS("http://www.w3.org/XML/1998/n amespace", "id")', '"outer"');
51 shouldBe('parsedDoc.querySelector("inner").localName', '"inner"'); 51 shouldBe('parsedDoc.querySelector("inner").localName', '"inner"');
52 shouldBe('parsedDoc.querySelector("inner").namespaceURI', '"http://www.example.c om"'); 52 shouldBe('parsedDoc.querySelector("inner").namespaceURI', '"http://www.example.c om"');
53 shouldBe('parsedDoc.querySelector("inner").getAttributeNS(null, "id")', '"inner" '); 53 shouldBe('parsedDoc.querySelector("inner").getAttributeNS(null, "id")', '"inner" ');
54 </script> 54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698