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

Side by Side Diff: LayoutTests/fast/dom/setAttributeNS.html

Issue 122083002: createElementNS handles element name 'xmlns' correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed feedback. Created 6 years, 11 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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 1 <!DOCTYPE html>
2 "http://www.w3.org/TR/html4/loose.dtd"> 2 <script src="../../resources/js-test.js"></script>
3 <html> 3
4 <head>
5 <script> 4 <script>
6 function debug(str) { 5 description("Test that setAttributeNS with a null namespaceURI actually sets it to the value null and not a string with the contents 'null'.");
7 pre = document.getElementById('console');
8 text = document.createTextNode(str + '\n');
9 pre.appendChild(text);
10 }
11 6
12 function runTests() { 7 window.elem = document.createElementNS('http://www.example.org', 'test');
13 if (window.testRunner) 8 elem.setAttributeNS(null, 'name', 'value');
14 testRunner.dumpAsText(); 9 shouldBeNull('elem.attributes[0].namespaceURI');
15
16 elem = document.createElementNS('http://www.example.org', 'test')
17 attr = elem.setAttributeNS(null, 'name', 'value')
18
19 if (elem.attributes[0].namespaceURI == null)
20 debug('SUCCESS')
21 else
22 debug('FAILURE')
23 }
24
25 </script> 10 </script>
26 </head>
27 <body onload="runTests();">
28 This tests that setAttributeNS with a null namespaceURI actually sets it to the value null and not a string with the contents 'null'. If the test is sucessful, the text below should say "SUCCESS".
29 <pre id="console">
30 </pre>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698