Closed Bug 135793 Opened 22 years ago Closed 21 years ago

In <win046.html> JavaScript Testcase: 'window.frames' value should be checked for 'Window' instead of 'WindowCollection'

Categories

(Developer Documentation Graveyard :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mrt300, Assigned: stefanh)

References

()

Details

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.9) Gecko/20020311
BuildID:    2002031104

window.frames returns Window object instead of WindowCollection object on the
Client-Side JavaScript Test page.

Reproducible: Always
Steps to Reproduce:
1.Open the page.


Actual Results:  The test failed because the wrong type of Object is return.

Expected Results:  A WindowCollection object should be returned instead of a
Window object.
Confirming reported behavior with Mozilla trunk build 20020330xx WinNT.
The following javascript: URL may be used to test this:

         javascript: alert(window.frames)

For me, this is returning "[object Window]" in Mozilla, 
and not "[object WindowCollection]"

Reassigning to DOM Level 0, since this is a DOM property.
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
OS: Windows XP → All
QA Contact: pschwartau → desale
Who says a WindowCollection object should be returned?
That testcase seems flawed to me.
At least until recently we were returning '[object WindowCollection]'; see:
http://devedge.netscape.com/evangelism/docs/technotes/xref/window-object/
This was changed something like a year ago, it's an intentional change for
backwards compatibility, we need window.frames === window since real sites out
there rely on window.frames to have properties like name and location. Don't ask
why.

Over to desale, the testcase needs to be updated.
Assignee: jst → desale
*** Bug 142479 has been marked as a duplicate of this bug. ***
*** Bug 168865 has been marked as a duplicate of this bug. ***
*** Bug 177033 has been marked as a duplicate of this bug. ***
http://mozilla.org/quality/ngdriver/suites/javascript/win046.html needs to be
updated with reference to this bug so others (like me ;-) don't attempt to
report it.

This change should be made irrespective of whether the test needs to be changed.
Same issue here.  Please fix or remove the test.
Blocks: 142649
[Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.4a) Gecko/20030401]

Bug still there.

In the meantime, who can do comment 8 to avoid more duplicates ?


Based on <http://mozilla.org/quality/ngdriver/suites/javascript/nav006.html> source,
it seems straight forward:

In <http://mozilla.org/quality/ngdriver/suites/javascript/win046.html> source,
replace "Bug report required" by "Bug# 135793".
Summary: window.frames returns wrong object → In <win046.html> JavaScript Testcase: 'window.frames' value should be checked for 'Window' instead of 'WindowCollection'
Attached file Revised win046.html
I changed the [object WindowCollection] lines to [object Window].  I'm not
totally sure about what, if anything, that should be added to the top comment
of the file. Anyone care to help me out?
As of version 1.5a, the test: still fails; the results still report it received
[object Window] when expecting [object WindowCollection]; this bug ID is not
displayed in the "Bug Number" column.

Either of two things is happening:  The test case has not been fixed/updated; or
the fixes are not getting into the build for some reason.
RE: Comment #12:

It's the testcase that has not been fixed/updated...
Taking bug...
Assignee: desale → stefan_h
Status: NEW → ASSIGNED
Comment on attachment 131113 [details] [diff] [review]
Simple fix, same as in comment #11.

Seeking "r" for simple fix of DOM 0 testcase.
Attachment #131113 - Flags: review?(caillon)
Comment on attachment 131113 [details] [diff] [review]
Simple fix, same as in comment #11.

We really should make these testcases check what type of object they are
instanceof rather than compares .toString() outputs....
Re comment 4
Is the change supposed to apply to standards-compliant mode as well?
Comment on attachment 131113 [details] [diff] [review]
Simple fix, same as in comment #11.

Let's fix the testcase to not check the .toString() value, but rather to check
instanceof instead.
Attachment #131113 - Flags: review?(caillon)
I checked in stefan's patch in the mean time so that people stop wondering about
this "bug". I filed bug 226711 for the instanceof issue. Marking this fixed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Component: DOM: Level 0 → Mozilla Developer
Product: Browser → Documentation
Version: Trunk → unspecified
Component: Mozilla Developer → Documentation Requests
Product: Documentation → Mozilla Developer Center
Component: Documentation Requests → Documentation
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: