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> |