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

Side by Side Diff: third_party/WebKit/LayoutTests/dom/domparsing/xmlserializer-attribute-special-namespaces.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 special XML namespaces on attributes, as reported in <a href="http://crbug.com/395950">bug 395950</a>.'); 4 description('Tests the serialization of special XML namespaces on attributes, as reported in <a href="http://crbug.com/395950">bug 395950</a>.');
5 5
6 var xmlDocument = (new DOMParser()).parseFromString('<outer />', 'text/xml'); 6 var xmlDocument = (new DOMParser()).parseFromString('<outer />', 'text/xml');
7 7
8 var inner1 = xmlDocument.createElementNS(null, 'inner1'); 8 var inner1 = xmlDocument.createElementNS(null, 'inner1');
9 // The xlink's namespace prefix is xlink by default, not auto-generated. 9 // The xlink's namespace prefix is xlink by default, not auto-generated.
10 inner1.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'http://www.google .com'); 10 inner1.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'http://www.google .com');
(...skipping 25 matching lines...) Expand all
36 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttributeNS("http:// www.w3.org/1999/xlink", "href")', 'http://www.google.com'); 36 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttributeNS("http:// www.w3.org/1999/xlink", "href")', 'http://www.google.com');
37 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttribute("xl:href") ', 'http://www.google.com'); 37 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttribute("xl:href") ', 'http://www.google.com');
38 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttributeNS("http:// www.w3.org/XML/1998/namespace", "attr")', 'value'); 38 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttributeNS("http:// www.w3.org/XML/1998/namespace", "attr")', 'value');
39 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttribute("xml:attr" )', 'value'); 39 shouldBeEqualToString('parsedDoc.querySelector("inner2").getAttribute("xml:attr" )', 'value');
40 40
41 // Check that the correct xmlns definitions were emitted. 41 // Check that the correct xmlns definitions were emitted.
42 shouldBeEqualToNumber('xmlString.indexOf("xmlns:xml")', -1); 42 shouldBeEqualToNumber('xmlString.indexOf("xmlns:xml")', -1);
43 shouldNotBe('xmlString.indexOf("xmlns:xlink")', '-1'); 43 shouldNotBe('xmlString.indexOf("xmlns:xlink")', '-1');
44 shouldNotBe('xmlString.indexOf("xmlns:xl")', '-1'); 44 shouldNotBe('xmlString.indexOf("xmlns:xl")', '-1');
45 </script> 45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698