Closed Bug 705967 Opened 13 years ago Closed 13 years ago

reftest assumes we are loaded in a window and have direct access to a document

Categories

(Testing :: Reftest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla11

People

(Reporter: jmaher, Assigned: jmaher)

References

Details

Attachments

(1 file, 1 obsolete file)

if we are to load reftests outside of a content or xul window (say as a javascript module or via a bootstrap extension), we will not have access to window.* or document.*.

This patch resolves this for reftest.js by adding a refWindow which we use to references everything.  

here is a link to a try server run with this patch:
https://tbpl.mozilla.org/?tree=Try&rev=5338880f9ddf
Attachment #577454 - Flags: review?(dbaron)
Blocks: 704509
Comment on attachment 577454 [details] [diff] [review]
use refWindow to access window and document (1.0)

># HG changeset patch
># Parent c3b13c7ff1cbf58d8a4a9c4add5f167eba72e512
>try: -b o -p all -u reftest,reftest-ipc,reftest-no-accel,crashtest,crashtest-ipc,jsreftest -t none

In the future, please use useful commit messages when posting patches for review.

>+var refWindow = null;

How about gContainingWindow instead of refWindow?

r=dbaron with that
Attachment #577454 - Flags: review?(dbaron) → review+
updated patch to variable name changed as per review.
Assignee: nobody → jmaher
Attachment #577454 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #581676 - Flags: review+
Attachment #581676 - Attachment description: use gcontainingWindow to access window and document (1.1) → use gContainingWindow to access window and document (1.1)
https://hg.mozilla.org/mozilla-central/rev/e3d5b255e109
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: