Reviewed and tweaked by Darin.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2006 06:16:58 +0000 (06:16 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2006 06:16:58 +0000 (06:16 +0000)
        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6648
          Safari strips namespace prefix when using setAttribute(), but should treat it as part of name

        * fast/dom/Element: Added.
        * fast/dom/Element/setAttribute-with-colon.html: Added.
        * fast/dom/Element/setAttribute-with-colon-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/dom/Element/setAttribute-with-colon-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Element/setAttribute-with-colon.html [new file with mode: 0644]

index 89836a71a60409c9f08dc7b923b26dfbdeae474c..6ea52824ab1ca91fe0fafd7367df1aaad15fcb85 100644 (file)
@@ -1,3 +1,14 @@
+2006-02-08  Boris Daljevic  <boris@backbase.com>
+
+        Reviewed and tweaked by Darin.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6648
+          Safari strips namespace prefix when using setAttribute(), but should treat it as part of name
+
+        * fast/dom/Element: Added.
+        * fast/dom/Element/setAttribute-with-colon.html: Added.
+        * fast/dom/Element/setAttribute-with-colon-expected.txt: Added.
+
 2006-02-08  Mitz Pettel  <opendarwin.org@mitzpettel.com>
 
         Reviewed by Hyatt.
diff --git a/LayoutTests/fast/dom/Element/setAttribute-with-colon-expected.txt b/LayoutTests/fast/dom/Element/setAttribute-with-colon-expected.txt
new file mode 100644 (file)
index 0000000..1debf0f
--- /dev/null
@@ -0,0 +1,7 @@
+This tests checks whether setAttribute allows name parameters with colons in them. If the test is successful, text below should say "SUCCESS".
+
+namespace is null
+prefix is null
+localName is bb:dddd
+SUCCESS
+
diff --git a/LayoutTests/fast/dom/Element/setAttribute-with-colon.html b/LayoutTests/fast/dom/Element/setAttribute-with-colon.html
new file mode 100644 (file)
index 0000000..0c164fb
--- /dev/null
@@ -0,0 +1,34 @@
+<!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.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    elem = document.createElementNS('http://www.example.org', 'test');
+    attr = elem.setAttribute('bb:dddd', 'attr_value');
+    attrNode = elem.attributes[0];
+    debug("namespace is " + attrNode.namespaceURI);
+    debug("prefix is " + attrNode.prefix);
+    debug("localName is " + attrNode.localName);
+    if (attrNode.namespaceURI == null && attrNode.prefix == null && attrNode.localName == 'bb:dddd')
+        debug('SUCCESS')
+    else
+        debug('FAILURE')
+}
+
+</script>
+</head>
+<body onload="runTests();">
+<p>This tests checks whether setAttribute allows name parameters with colons in them. If the test is successful, text below should say "SUCCESS".</p>
+<pre id="console"></pre>
+</body>
+</html>