Bug 17060 - Acid3 expects textNode.localName == null
Summary: Acid3 expects textNode.localName == null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://acid3.acidtests.org/
Keywords: HasReduction
: 15949 (view as bug list)
Depends on:
Blocks: Acid3 17048
  Show dependency treegraph
 
Reported: 2008-01-29 00:23 PST by Eric Seidel (no email)
Modified: 2008-03-03 05:01 PST (History)
4 users (show)

See Also:


Attachments
test case (197 bytes, text/html)
2008-01-29 00:25 PST, Eric Seidel (no email)
no flags Details
Fix textNode.localName and add tests to cover other node initial values (15.72 KB, patch)
2008-02-03 04:18 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Fix textNode.localName and add tests to cover other node initial values (18.62 KB, patch)
2008-02-03 04:51 PST, Eric Seidel (no email)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-01-29 00:23:24 PST
Acid3 expects textNode.localName == null

      // test 66: localName on attributes, from Sylvain Pasche
      var test = document.createTextNode("test");
      assertEquals(test.localName, null, 'wrong localName');
      return 5;

We return #text.  It would be interesting to know what other browsers do.
Comment 1 Eric Seidel (no email) 2008-01-29 00:25:30 PST
Created attachment 18757 [details]
test case
Comment 2 Alexey Proskuryakov 2008-01-29 00:28:45 PST
      // test 66: localName on attributes, from Sylvain Pasche
      var test = document.createTextNode("test");

What is the attribute the comment is talking about?

See also: bug 17048 (for createAttribute).
Comment 3 Ian 'Hixie' Hickson 2008-01-30 16:14:28 PST
the comment in the test was wrong. fixed.
Comment 4 Eric Seidel (no email) 2008-02-03 04:18:29 PST
Created attachment 18880 [details]
Fix textNode.localName and add tests to cover other node initial values

 LayoutTests/ChangeLog                              |   14 ++
 .../fast/dom/Node/initial-values-expected.txt      |  102 +++++++++++++++
 LayoutTests/fast/dom/Node/initial-values.html      |   13 ++
 LayoutTests/fast/dom/Node/resources/TEMPLATE.html  |   13 ++
 .../fast/dom/Node/resources/initial-values.js      |  138 ++++++++++++++++++++
 WebCore/ChangeLog                                  |   15 ++
 WebCore/dom/Comment.cpp                            |    5 -
 WebCore/dom/Comment.h                              |    1 -
 WebCore/dom/Node.cpp                               |    2 +-
 WebCore/dom/Text.cpp                               |    5 -
 WebCore/dom/Text.h                                 |    1 -
 11 files changed, 296 insertions(+), 13 deletions(-)
Comment 5 Eric Seidel (no email) 2008-02-03 04:51:00 PST
Created attachment 18881 [details]
Fix textNode.localName and add tests to cover other node initial values

 LayoutTests/ChangeLog                              |   14 ++
 .../fast/dom/Node/initial-values-expected.txt      |  130 ++++++++++++++
 LayoutTests/fast/dom/Node/initial-values.html      |   13 ++
 LayoutTests/fast/dom/Node/resources/TEMPLATE.html  |   13 ++
 .../fast/dom/Node/resources/initial-values.js      |  178 ++++++++++++++++++++
 WebCore/ChangeLog                                  |   15 ++
 WebCore/dom/Comment.cpp                            |    5 -
 WebCore/dom/Comment.h                              |    1 -
 WebCore/dom/Node.cpp                               |    2 +-
 WebCore/dom/Text.cpp                               |    5 -
 WebCore/dom/Text.h                                 |    1 -
 11 files changed, 364 insertions(+), 13 deletions(-)
Comment 6 Eric Seidel (no email) 2008-02-03 04:52:04 PST
Comment on attachment 18880 [details]
Fix textNode.localName and add tests to cover other node initial values

I've updated this with a new patch which adds a couple more tests.
Comment 7 Eric Seidel (no email) 2008-02-03 04:56:51 PST
As previously mentioned, this test case tests for the exact behavior as spec'd in DOM Level 3.  There are a few failures remaining for WebKit.

Failures shared by FF3b2:
FAIL attr.localName should be null (of type object). Was foo (of type string).
FAIL attr.localName should be null (of type object). Was foo (of type string).
FAIL doc.namespaceURI should be http://www.w3.org/1999/xhtml (of type string). Was null (of type object).
FAIL element.localName should be null (of type object). Was pre (of type string).
(FF3b2 fails with "PRE" instead of "pre")
FAIL element.localName should be null (of type object). Was pre (of type string).
(FF3b2 fails with "pre" instead of "PRE" however.)

Failures unique to WebKit:
FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string).
FAIL element.nodeName should be html:pre. Was PRE.
FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string)

Comment 8 Darin Adler 2008-02-03 13:15:19 PST
Comment on attachment 18881 [details]
Fix textNode.localName and add tests to cover other node initial values

Seems OK, r=me.
Comment 9 Eric Seidel (no email) 2008-02-03 15:58:09 PST
I filed bug 17167 to track the "failures" in this test case.   Landed as r29953.  Yay for 73/100 on Acid3!
Comment 10 Alexey Proskuryakov 2008-03-03 05:01:03 PST
*** Bug 15949 has been marked as a duplicate of this bug. ***