root/trunk/LayoutTests/fast/dom/Window/window-special-properties-expected.txt

Revision 41636, 3.4 KB (checked in by pam@chromium.org, 12 months ago)

2009-03-12 Pamela Greene < pam@chromium.org>

Reviewed by Alexey Proskuryakov.

Add test cases to make sure window.location and window.navigator
have higher lookup precedence than a DOM element with that ID.

 https://bugs.webkit.org/show_bug.cgi?id=24522

  • fast/dom/Window/window-special-properties-expected.txt:
  • fast/dom/Window/window-special-properties.html:
  • Property svn:eol-style set to native
Line 
1This test covers the various ways of accessing DOM elements through the window object by name, id or index, directly as properties of the window object. This lookup is supposed to include applet, embed, form, image and object by name, and all elements by id. It should give the element itself in the case of a single match, or an HTMLCollection in the case of multiple matches; except that when iframes are involved, it will give the window object for the first iframe match.
2
3Our results match WinIE in all respects but one. We allow child frame names to take precedence over built-in and custom properties of the window object. This is the Mozilla behavior and is required to make some sites work because they use frame names that collide with built-in properties in Mozilla but not IE - specifically "toobar". See Radar 3870317.
4
5Results:
6
7Nonexistent image name: undefined
8Image by name (unique): single IMG(name)
9Image by name (multiple): collection(2) IMG(name) IMG(name)
10Image by id (unique): single IMG(id)
11Image by id (multiple): collection(2) IMG(id) IMG(id)
12Image by id/name mixed: collection(4) IMG(id) IMG(name) IMG(name) IMG(id)
13
14Nonexistent form name: undefined
15Form by name (unique): single FORM(name)
16Form by name (multiple): collection(2) FORM(name) FORM(name)
17Form by id (unique): single FORM(id)
18Form by id (multiple): collection(2) FORM(id) FORM(id)
19Form by id/name mixed: collection(4) FORM(id) FORM(name) FORM(name) FORM(id)
20
21Nonexistent applet name: undefined
22Applet by name (unique): single APPLET(name)
23Applet by name (multiple): collection(2) APPLET(name) APPLET(name)
24Applet by id (unique): single APPLET(id)
25Applet by id (multiple): collection(2) APPLET(id) APPLET(id)
26Applet by id/name mixed: collection(4) APPLET(id) APPLET(name) APPLET(name) APPLET(id)
27
28Nonexistent object name: undefined
29Object by name (unique): single OBJECT(name)
30Object by name (multiple): collection(2) OBJECT(name) OBJECT(name)
31Object by id (unique): single OBJECT(id)
32Object by id (multiple): collection(2) OBJECT(id) OBJECT(id)
33Object by id/name mixed: collection(4) OBJECT(id) OBJECT(name) OBJECT(name) OBJECT(id)
34
35Nonexistent embed name: undefined
36Embed by name (unique): single EMBED(name)
37Embed by name (multiple): collection(2) EMBED(name) EMBED(name)
38Embed by id (unique): single EMBED(id)
39Embed by id (multiple): collection(2) EMBED(id) EMBED(id)
40Embed by id/name mixed: collection(4) EMBED(id) EMBED(name) EMBED(name) EMBED(id)
41
42Nonexistent iframe name: undefined
43Iframe by name (unique): single WINDOW
44Iframe by name (multiple): single WINDOW
45Iframe by id (unique): single WINDOW
46Iframe by id (multiple): single WINDOW
47Iframe by id/name mixed: single WINDOW
48
49Nonexistent span name: undefined
50Span by name (unique): undefined
51Span by name (multiple): undefined
52Span by id (unique): single SPAN(id)
53Span by id (multiple): collection(2) SPAN(id) SPAN(id)
54Span by id/name mixed: collection(2) SPAN(id) SPAN(id)
55
56Mixed by id: single WINDOW
57Mixed by name: single WINDOW
58Mixed by id (no iframe): collection(6) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) SPAN(id)
59Mixed by name (no iframe): collection(5) IMG(name) FORM(name) APPLET(name) EMBED(name) OBJECT(name)
60
61Numeric 0: single WINDOW
62Numeric 12: single WINDOW
63Numeric 13: undefined
64
65Conflicting image name: single OTHER
66Conflicting image name (custom property): single OTHER
67Conflicting iframe: single OTHER
68
69Input by id (unique): single INPUT(id)
70Conflicting input id (navigator): single OTHER
71Conflicting input id (location): single OTHER
72
Note: See TracBrowser for help on using the browser.