Commit Graph

9 Commits

Author SHA1 Message Date
Kris Maglione
c421d23abb Bug 1344616: Support running content script tests in xpcshell. r=mixedpuppy
MozReview-Commit-ID: 57yhjZxVl90
2017-03-06 13:09:40 -08:00
Gijs Kruitbosch
9ecbd820dc Bug 1236991 - part 3: allow use of todo() from ContentTask, r=mconley
MozReview-Commit-ID: EfucLgxcf8Y
2016-04-11 17:11:35 +01:00
Mike de Boer
677e2a2163 Bug 1241930: Part 1 - make all Assert.jsm assert methods available for use in ContentTasks. r=mconley 2016-03-04 14:32:22 +01:00
Bill McCloskey
9ad429d9b1 Bug 1219504 - BrowserTestUtils changes (r=mconley) 2015-11-04 10:56:15 -08:00
Shu-yu Guo
37989840cd Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
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