Closed Bug 649360 Opened 14 years ago Closed 13 years ago

Convert some of the EventUtils.js over to SpecialPowers

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 674323

People

(Reporter: dougt, Assigned: jmaher)

References

(Blocks 1 open bug)

Details

(Whiteboard: [specialpowers])

Attachments

(1 file, 2 obsolete files)

I converted some of the EventUtils over to use SpecialPowers so that I can start gettings some of the mochitests passing. One question -- how do I tell from the SpecialPowers component if we are doing remote e10s layers or not? maybe the pref: browser.remote.tabs?
Attached patch patch v.1 (obsolete) — Splinter Review
Assignee: nobody → doug.turner
The only thing I could tell you to check would be nsIXULRuntime.processType. However, we've been writing everything to simply assume we're running with a content process, so you might as well continue on that path. Firefox is going to get there at some point, so it doesn't seem worthwhile adding extra complexity to do things differently for IPC vs. non-IPC.
Blocks: 462483
I have a simple check in my ipc.js file: if (xulRuntime.processType == 2) { http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/ipc.js#82 this has been working as it runs on all desktop and mobile platforms for the last 9 months or so.
Technically you want to be testing that against Components.interfaces.nsIXULRuntime.PROCESS_TYPE_CONTENT: http://mxr.mozilla.org/mozilla-central/source/xpcom/system/nsIXULRuntime.idl#95 but regardless, I'm not sure why we need to test this. Shouldn't we just fix all the tests to assume they're running in a content process, since all the IPC code works fine in current desktop Firefox anyway? Seems silly to write conditional logic for a case that's going to go away within a year (non-IPC).
ted I think this is different because this code is the harness, not the tests themselves.
Still, I don't think it's worth writing two codepaths, one of which we know is going to be thrown away, unless there's a real compelling reason.
Attachment #525403 - Flags: review?(jmaher)
Attached patch patch + test fixes (WIP) (obsolete) — Splinter Review
this patch actually implements and uses the snapshotwindow, comparewindow, synthesizeKey and synthesizeMouse. The problem is we can't check this in because the chrome tests depend on these utilities and ATM chrome doesn't have access to SpecialPowers. good news is with this patch on desktop firefox and fennec we are really really close to green for layout/base in mochitest-plain!
Attachment #525403 - Attachment is obsolete: true
Attachment #525403 - Flags: review?(jmaher)
Whiteboard: specialpowers
Whiteboard: specialpowers → [specialpowers]
Assignee: doug.turner → jmaher
Depends on: 666636
Depends on: 666643
Depends on: 666649
Depends on: 666654
Depends on: 666660
Blocks: 668283
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: