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

RESOLVED FIXED in mozilla11

Status

Testing
Reftest
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jmaher, Assigned: jmaher)

Tracking

Trunk
mozilla11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 577454 [details] [diff] [review]
use refWindow to access window and document (1.0)

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)

Updated

6 years ago
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+
(Assignee)

Comment 2

6 years ago
Created attachment 581676 [details] [diff] [review]
use gContainingWindow to access window and document (1.1)

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)
(Assignee)

Comment 3

6 years ago
landed on m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3d5b255e109
https://hg.mozilla.org/mozilla-central/rev/e3d5b255e109
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.