The default bug view has changed. See this FAQ.

global variables pollute the browser window during devtools tests

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Developer Tools
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dao, Assigned: dao)

Tracking

Trunk
Firefox 12
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 590212 [details] [diff] [review]
patch
Attachment #590212 - Flags: review?
(Assignee)

Updated

5 years ago
Attachment #590212 - Flags: review? → review?(rcampbell)
(Assignee)

Updated

5 years ago
Blocks: 658738
(Assignee)

Updated

5 years ago
Duplicate of this bug: 677996
Comment on attachment 590212 [details] [diff] [review]
patch

-Cu.import("resource:///modules/source-editor.jsm");
+let tempScope = {};
+Cu.import("resource:///modules/source-editor.jsm", tempScope);
+let SourceEditor = tempScope.SourceEditor;

this is a good pattern, but I wish it weren't necessary every time.

Does SimpleTest really not tear-down its environment after each test instance? Seems like we could do something there.

in any case, this looks solid. Should land ASAP.
Attachment #590212 - Flags: review?(rcampbell) → review+
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/fd894e4a7569
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
(Assignee)

Comment 4

5 years ago
> Does SimpleTest really not tear-down its environment after each test
> instance? Seems like we could do something there.

All browser chrome tests run in the same browser window, so if you add something to the window object, it's going to stick around. SimpleTest can't clean this up. The browser chrome test suite could open a new window for each test...

> https://hg.mozilla.org/integration/fx-team/rev/fd894e4a7569

Thanks, but it's "Dão" with a tilde. (One reason why I usually push my stuff myself.)
(In reply to Dão Gottwald [:dao] from comment #4)
> > https://hg.mozilla.org/integration/fx-team/rev/fd894e4a7569
> 
> Thanks, but it's "Dão" with a tilde. (One reason why I usually push my stuff
> myself.)

Sorry Dão (proving that I *can* type the tilde). I've had bad luck with UTF characters in push comments before so I left it out. If the spelling's really annoying, feel free to backout and repush.

I wanted to land this on fx-team to let people who have in-progress patches that they might have to rebase some test code rather than get bit by a merge from inbound.
https://hg.mozilla.org/mozilla-central/rev/fd894e4a7569
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 12
(In reply to Rob Campbell [:rc] (robcee) from comment #5)
> I've had bad luck with UTF
> characters in push comments before so I left it out.

if you're on Win you may try with "hgencoding=utf-8 hg command", it worked for me in the past
(Assignee)

Updated

5 years ago
Blocks: 720985
You need to log in before you can comment on or make changes to this bug.