[Webkit-unassigned] [Bug 16833] New: Acid3 expects createElementNS to throw exception for localname = ":div"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 10 20:00:06 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16833

           Summary: Acid3 expects createElementNS to throw exception for
                    localname = ":div"
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: XML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org


Acid3 expects createElementNS to throw exception for localname = ":div"

We fail to throw exception 14 in the ":div" case.

    function () {
      // test 23: createElementNS() with invalid tag names
      var test = function (name, ns, code) {
        var result;
        try {
          var div = document.createElementNS(ns, name);
        } catch (e) {
          result = e;
        }
        return result && result.code == code;
      }
      assert(test('<div>', null, 5), "no, or wrong, exception for: <div>");
      assert(test('0div', null, 5), "no, or wrong, exception for: 0div");
      assert(test('di v', null, 5), "no, or wrong, exception for: di v");
      assert(test('di<v', null, 5), "no, or wrong, exception for: di<v");
      assert(test('-div', null, 5), "no, or wrong, exception for: -div");
      assert(test('.div', null, 5), "no, or wrong, exception for: .div");
      assert(test('<div>', "http://example.com/", 5), "no, or wrong, exception
for: <div>");
      assert(test('0div', "http://example.com/", 5), "no, or wrong, exception
for: 0div");
      assert(test('di<v', "http://example.com/", 5), "no, or wrong, exception
for: di<v");
      assert(test('-div', "http://example.com/", 5), "no, or wrong, exception
for: -div");
      assert(test('.div', "http://example.com/", 5), "no, or wrong, exception
for: .div");
      assert(test(':div', null, 14), "no, or wrong, exception for: :div");
      assert(test(':div', "http://example.com/", 14), "no, or wrong, exception
for: :div");
      assert(test('d:iv', null, 14), "no, or wrong, exception for: d:iv");
      assert(test('xml:test', "http://example.com/", 14), "no, or wrong,
exception for: xml:test");
      assert(test('xmlns:test', "http://example.com/", 14), "no, or wrong,
exception for: xmlns:test");
      assert(test('x:test', "http://www.w3.org/2000/xmlns/", 14), "no, or
wrong, exception for: x:test");
      document.createElementNS('xmlns:test', "http://www.w3.org/2000/xmlns/");
      return 2;
    },


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list