[Webkit-unassigned] [Bug 70810] nameNodeListCache should be invalidated when name attribute changes/modified.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 9 12:11:31 PST 2011


--- Comment #23 from Ryosuke Niwa <rniwa at webkit.org>  2011-12-09 12:11:31 PST ---
(From update of attachment 118594)
View in context: https://bugs.webkit.org/attachment.cgi?id=118594&action=review

>>> LayoutTests/fast/dom/getelementsbyname-invalidation-cache.html:32
>>> +    shouldBeTrue("document.getElementsByName('fullname').length != oldLength");
>> You could create a function like createElement() that takes a tag name and returned the element. That way, shouldBeTrue will include the tag name and you don't need to add extra lines by debug.
> I am facing some problem here.
> Suppose, getElement(tagName) is the function which return me the element based on the tag name. 
> Now when we do shouldBeTrue("getElement(); document.getElementsByName('fullname').length != oldLength") it gives "PASS getElement(); document.getElementsByName('fullname').length != oldLength is true" in the expected output rather giving me the actual tag name in the expected result.
> Can you please correct me if I am missing something here. Thanks.

You can do:
shouldBeTrue("CreateTwoElements('" + tagName + "); document.getElementsByName('fullname').length", "2");
shouldBeTrue("document.querySelector("' + tagName + '"); document.getElementsByName('fullname').length", "1");
// Remove those two elements here.

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

More information about the webkit-unassigned mailing list