Bug 24522

Summary: Add test cases to check precedence of window.location and navigator versus a DOM element
Product: WebKit Reporter: Pam Greene (IRC:pamg) <pam>
Component: DOMAssignee: Pam Greene (IRC:pamg) <pam>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Modified test + new results ap: review+

Description Pam Greene (IRC:pamg) 2009-03-11 14:08:34 PDT
Make sure window.location and window.navigator have higher lookup precedence than a DOM element with that ID.
Comment 1 Pam Greene (IRC:pamg) 2009-03-11 14:10:26 PDT
Created attachment 28492 [details]
Modified test + new results
Comment 2 Alexey Proskuryakov 2009-03-12 01:13:33 PDT
Comment on attachment 28492 [details]
Modified test + new results

r=me

Please mention in ChangeLog (or in the bug) whether these new tests give the same results in both IE and Firefox.
Comment 3 Pam Greene (IRC:pamg) 2009-03-12 11:38:45 PDT
Thanks, landed in r41636.

* IE6 and IE7: match trunk WebKit

* FF (Mac 3.0.7): Different results (mostly "undefined") for nearly all of the items already tested by this test. It raises a SecurityError exception at the "Conflicting iframe" case and does not get to the new ones. When those are moved to the top of the test, it gives

Input by id (unique): undefined
Conflicting input id (navigator): single OTHER
Conflicting input id (location):

and raises a SecurityError exception on that third case.