Closed
Bug 135793
Opened 23 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)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: mrt300, Assigned: stefanh)
References
()
Details
Attachments
(2 files)
2.02 KB,
text/html
|
Details | |
903 bytes,
patch
|
Details | Diff | Splinter Review |
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.
Comment 1•23 years ago
|
||
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
Comment 2•23 years ago
|
||
Who says a WindowCollection object should be returned?
That testcase seems flawed to me.
Comment 3•23 years ago
|
||
At least until recently we were returning '[object WindowCollection]'; see:
http://devedge.netscape.com/evangelism/docs/technotes/xref/window-object/
Comment 4•23 years ago
|
||
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
Comment 5•23 years ago
|
||
*** Bug 142479 has been marked as a duplicate of this bug. ***
![]() |
||
Comment 6•22 years ago
|
||
*** Bug 168865 has been marked as a duplicate of this bug. ***
Comment 7•22 years ago
|
||
*** Bug 177033 has been marked as a duplicate of this bug. ***
Comment 8•22 years ago
|
||
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.
Comment 9•22 years ago
|
||
Same issue here. Please fix or remove the test.
Comment 10•22 years ago
|
||
[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".
Updated•22 years ago
|
Summary: window.frames returns wrong object → In <win046.html> JavaScript Testcase: 'window.frames' value should be checked for 'Window' instead of 'WindowCollection'
Reporter | ||
Comment 11•22 years ago
|
||
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?
Comment 12•22 years ago
|
||
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.
Assignee | ||
Comment 13•22 years ago
|
||
RE: Comment #12:
It's the testcase that has not been fixed/updated...
Assignee | ||
Comment 14•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 16•21 years ago
|
||
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 17•21 years ago
|
||
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....
Comment 18•21 years ago
|
||
Re comment 4
Is the change supposed to apply to standards-compliant mode as well?
Comment 19•21 years ago
|
||
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)
Comment 20•21 years ago
|
||
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
Updated•21 years ago
|
Status: RESOLVED → VERIFIED
Component: DOM: Level 0 → Mozilla Developer
Product: Browser → Documentation
Version: Trunk → unspecified
Updated•18 years ago
|
Component: Mozilla Developer → Documentation Requests
Product: Documentation → Mozilla Developer Center
Updated•12 years ago
|
Component: Documentation Requests → Documentation
Updated•12 years ago
|
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.
Description
•