Commit Graph

4 Commits

Author SHA1 Message Date
Tim Taubert
d75e6fcc1a Bug 1134518 - Use the globalMM for ContentTask's frame script to prevent it from being loaded twice into a docShell swapped to another browser window r=bustage 2015-04-24 11:06:27 +02:00
Tim Taubert
34b8f7f79e Bug 1134518 - Add test to ensure we don't lose shistory entries when switching a browser's remoteness r=Mossop 2015-04-23 15:42:55 +02:00
Dave Townsend
cb942f4663 Bug 1136910: Fix browser_tab_dragdrop.js to avoid CPOWs and correctly test clicks. r=mconley, r=ttaubert
Switches the whole test to task based and removes most of the CPOW traffic, the
plugin checks are the notable exception.

This also makes ContentTask act sanely in the presence of tab detach by using
browser.permanentKey as the indication that the framescript has been loaded and
just listening to all frames.

Also adds a click in the upper-left of the content area to browser_tabopen_reflows.js
to make sure the mouse isn't hovered over one of the tiles causing an unexpected
reflow.
2015-03-09 15:53:01 -07:00
Steven MacLeod
2cfbc7bdd4 Bug 1107609 - Implement ContentTask.spawn; r=Gijs r=mconley
This introduces a new medule ContentTask, which includes a spawn method.
This new method can be used to spawn a task in the content process of a
browser. When called, a promise will be returned which resolves to the
value returned by the task.

This allows you to quickly write test code which can touch the content
and return information without having to write custom framescripts all
the time (The content code can be written inline as a simple generator
definition). ContentTask is automatically included in the scope of
mochitests.

An example use follows:

yield ContentTask.spawn(browser, {}, function* gen_replaceState() {
  content.window.history.replaceState({}, "", 'test-entry/');
  return "Value that the promise will resolve with";
});
2015-02-11 17:28:44 -05:00