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

Unified 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, 12 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/setAttributeNS.html
diff --git a/LayoutTests/fast/dom/setAttributeNS.html b/LayoutTests/fast/dom/setAttributeNS.html
index 814fb0abc73f01afa91197013ba063a6ddd26b8d..8f974359e11cf733bd69ee0c4e1bfc5027ab40e7 100644
--- a/LayoutTests/fast/dom/setAttributeNS.html
+++ b/LayoutTests/fast/dom/setAttributeNS.html
@@ -1,32 +1,10 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<script>
-function debug(str) {
- pre = document.getElementById('console');
- text = document.createTextNode(str + '\n');
- pre.appendChild(text);
-}
-
-function runTests() {
- if (window.testRunner)
- testRunner.dumpAsText();
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
- elem = document.createElementNS('http://www.example.org', 'test')
- attr = elem.setAttributeNS(null, 'name', 'value')
-
- if (elem.attributes[0].namespaceURI == null)
- debug('SUCCESS')
- else
- debug('FAILURE')
-}
+<script>
+description("Test that setAttributeNS with a null namespaceURI actually sets it to the value null and not a string with the contents 'null'.");
+window.elem = document.createElementNS('http://www.example.org', 'test');
+elem.setAttributeNS(null, 'name', 'value');
+shouldBeNull('elem.attributes[0].namespaceURI');
</script>
-</head>
-<body onload="runTests();">
-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".
-<pre id="console">
-</pre>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698