Граф коммитов

280 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen cf4259bb3d Bug 1426154 - Refactor Marionette content frame script registration. r=automatedtester
The Marionette:newSession IPC message is never used, and the
newSession function is consequently never called.  Since we no
longer have a need for resetting the content frame script, like
had with B2G, removing it is probably fine.

This also changes the Marionette:Register command to return an object
with the "outerWindowID" key, making it easier to identify and extract.

MozReview-Commit-ID: Ae3cPFWshcv

--HG--
extra : rebase_source : 056e9f2016317c314b9d46699669bfc76ea0bc37
2018-01-09 19:50:30 +00:00
Andreas Tolfsen 480ee1d6e7 Bug 1426154 - Sort message listeners lexicographically. r=automatedtester
It is easier to review what message listeners are added and removed
when the list is sorted.

MozReview-Commit-ID: 2fMpulA42Ww

--HG--
extra : rebase_source : 64e80f7c314596f27400657bd2e77da110f1443e
2018-01-09 19:48:14 +00:00
Andreas Tolfsen 7eb64afd98 Bug 1426154 - Use targetted IPC messages to talk to content frames. r=automatedtester
Prior to this patch Marionette used a broadcasting technique that
sent every IPC message to every registered content frame's message
manager.  This was implemented in GeckoDriver#sendAsync and worked
by appending the frame's outerWindowID to the message name to ensure
it reached the correct recipient.

Because it is hugely wasteful for every content frame to receive every IPC
message, this patch changes it so that we use a frame's dedicated message
manager to only channel messages it cares about.  A content frame's
direct message manager is stored in browser.Context#messageManager,
whereas GeckoDriver#mm is always the global message manager.

MozReview-Commit-ID: L0sD3VhzStv

--HG--
extra : rebase_source : 3f77075d88036d1e381a1a3fbbd359656838532c
2018-01-09 17:48:57 +00:00
Andreas Tolfsen 5fe12f3b2d Bug 1379490 - Query capabilities configuration from chrome. r=automatedtester
Capabilities are currently sent to the content frame script when
its IPC message listeners attach (on Marionette:ListenersAttached).
If for whatever reason a capability's value changes since the script
was registered, for example by a user calling the WebDriver:SetTimeouts
command, a race condition is introduced where the capabilities in
chrome will differ from those cached in the frame script.

To remove any chance of race conditions, this patch changes the
content frame script to query the capabilities from chrome every time
it needs them.  This is slightly less efficient, but should be neglible.

The patch also clears up some unused state, such as the
curBrowser.newSessionCommandId property, which did not appear to
be used for anything interesting.

MozReview-Commit-ID: 1bSrRu5nK3h

--HG--
extra : rebase_source : 06f6fb8e4a6d04e5c4fa56d1becafd55ed0d1dee
2018-01-02 12:00:41 +00:00
Andreas Tolfsen 3bf8512e70 Bug 1423282 - Drop Marionette:emitTouchEvent IPC message and related infra. r=automatedtester,maja_zf
This removes the Marionette:emitTouchEvent IPC message which is
currently not in use by any tests.  Along with removing this message
listener we can get rid of a tonne of complicated infrastructure
in testing/marionette/frame.js.

On switching the content frame we no longer await frame scripts to
register themselves because they implicitly inherit the parent's
frame script in Firefox/Fennec.  This was a relic from the B2G days
when each frame was OOP.

MozReview-Commit-ID: 5vxrWHjzd68

--HG--
extra : rebase_source : 544013f42c9ee9eebb119b8d98061d997c7a10f0
2017-12-05 21:08:48 +00:00
Andreas Tolfsen 774177521d Bug 1423282 - Drop MarionetteFrame:getCurrentFrameId IPC message. r=automatedtester,maja_zf
The MarionetteFrame:getCurrentFrameId IPC message was used for B2G
applications that needed access to chrome-scoped APIs for emitting
touch events.  Now that actions happen either in chrome _or_ in
content this is no longer necessary functionality to maintain.

MozReview-Commit-ID: Bk9LRAOxjAw

--HG--
extra : rebase_source : 71dac090db681a24dc5ebb54fdf1cf02a97563b0
2017-12-05 19:40:29 +00:00
Andreas Tolfsen f42cdc3940 Bug 1423282 - Drop MarionetteFrame:getInterruptedState IPC message. r=automatedtester,maja_zf
MarionetteFrame:getInterruptedState was used in B2G to abortence
if the OOP frame got interrupted by a modal dialogue.  Like the
MarionetteFrame:handleModal IPC message, the frame script needed
chrome assistance for querying the presence of this dialogue.

Today modal dialogues (known as "user prompts") are handled entirely
in chrome space, and the presence of such a dialogue is indeed
meant to pause script execution in the web document.

This patch makes some rather questionable changes to the legacyaction
module, but this is alright because we don't expect any more tests to
be written using it.  This patch just about makes sure the remaining
body of tests keeps passing.

MozReview-Commit-ID: 72g0GlYy21T

--HG--
extra : rebase_source : f44ed5999554a42c67827d6935bd96cc79a8e5dd
2017-12-05 19:22:53 +00:00
Andreas Tolfsen f1282f9d51 Bug 1423282 - Drop Marionette:switchToModalOrigin IPC message. r=automatedtester
In B2G, when a frame was interrupted by a modal dialogue, the
Marionette:switchToModalOrigin IPC message allowed you to switch
back to the frame that was interrupted.  It got called by the
interrupted frame once the dialogue got dismissed and the frame
resumed its process.  This functionality is no longer requried.

MozReview-Commit-ID: DtCOzeW45qP

--HG--
extra : rebase_source : 46ed3841abc53e0369246625d16839e9b2576d39
2017-12-05 18:44:24 +00:00
Andreas Tolfsen 68c9c60264 Bug 1423209 - Drop ability to put frame script to sleep. r=automatedtester
Marionette has a Marionette:sleepSession IPC command it uses to put a
content frame script "to sleep".  This removes certain message handlers
and clears some state by calling deleteSession() in listener.js.
The frame script can later be "restarted" by calling Marionette:restart.

This is B2G-specific functionality we no longer need.  In an effort
to remove old cruft from Marionette before tackling the window
tracking refactoring we want to remove support for this.

This removes the Marionette:sleepSession and Marionette:restart
IPC messages as well as GeckoDriver#switchToGlobalMessageManager.
The latter function additionally resets GeckoDriver#mm to the global
message manager which is fine, because for Firefox/Fennec we never
use the targetted message manager.

There will be a follow-up bug to remove OOP frame handling and the
targetted message manager used in GeckoDriver#sendAsync.

MozReview-Commit-ID: GRSBReBfQGX

--HG--
extra : rebase_source : 9f5ff562e3547ee804ec350678cb688f2cf1b4fa
2017-12-05 17:07:36 +00:00
Henrik Skupin cb6d8c72b5 Bug 1414322 - Use WebDriver conformant interactability checks for sendKeysToElement. r=ato
Enables webdriver spec keyboard interactability tests for 'Element Send Keys'
by default by re-using the same capability 'moz:webdriverClick' from
'Element Click'. It can be disabled by turning off this preference.

Also various webplatform tests for webdriver spec have been added which
cover both the scroll into view action, and keyboard interactability check.

Existing Marionette unit tests will be run in both modes, until we can
get rid of the legacy mode.

MozReview-Commit-ID: dFB8sQ6CN5

--HG--
extra : rebase_source : 9f6a3c3e42f779f039f61d0b239f9f5925ecdcf5
2017-11-10 20:29:04 +01:00
Henrik Skupin 88c43fb94d Bug 1414322 - Refactor sendKeysToElement methods. r=ato
Each call to sendKeysToElement should go through the interaction
module, and never by directly calling event.sendKeysToElement. This
will make sure that keyboard interactability checks will always be
performed, even for chrome scope like alerts or modal dialogs.

MozReview-Commit-ID: GoDKjMsNZsq

--HG--
extra : rebase_source : c305c748e68e60abd01dab37d00a7e3aff7d3d64
2017-11-09 20:39:51 +01:00
Andreas Tolfsen 0cde42dcd0 Bug 1106913 - Send errors from sendResponse/sendError back to chrome. r=whimboo
Errors that arise from inside sendResponse or sendError are currently
only logged to stdout.  Now that we have a pretty safe error.wrap
implementation we should serialise them and return them to the main
process so that they are not "lost" in stdout.

MozReview-Commit-ID: FuMeUqQ7CMv

--HG--
extra : rebase_source : 2d43eb63ec13dbfb461d72dd9ddee232ff4ff9d8
2017-11-24 18:19:18 +00:00
muthuraj90ec@gmail.com 502bc1193d Bug 1385476 - Synthesize dblclick MouseEvent when performing webdriver actions; r=maja_zf
MozReview-Commit-ID: 9u2mtolhjUq

--HG--
extra : rebase_source : 76b2e3fbd3cbb86f062227c779e88e61fefc1d8d
2017-11-24 15:53:57 -05:00
Andreas Tolfsen 4a2fe54072 Bug 1420431 - Return no such element error when on no active element. r=maja_zf
document.activeElement will return null if there is no document
element.  This may happen if, for example, in an HTML document the
<body> element is removed.

The WPT test test_sucess_without_body in get_active_element.py
is wrong.  It expects Get Active Element to return null if there
is no document element, but following a recent specification change
we want it to return a no such element error.

Specification change: https://github.com/w3c/webdriver/pull/1157

MozReview-Commit-ID: LQJ3slV9aty

--HG--
extra : rebase_source : cc349bb642f57bb2203d126ecd86d8d988d90301
2017-11-24 16:23:02 +00:00
Andreas Tolfsen 0d995bbca5 Bug 1384956 - Get log level from main process when script is reloaded. r=whimboo
This is a workaround for https://bugzil.la/1411513 about Log.jsm
not being compatible with E10s.  It queries the log level via
synchronous IPC message to the main process.

MozReview-Commit-ID: 5RZluH8Rv9o

--HG--
extra : rebase_source : 7ccf803ec7041a2d910f5697f63ee8f1a978d79f
2017-11-11 17:43:24 -08:00
Henrik Skupin 20ad958852 Bug 1411393 - Marionette should not register listeners on the global window or document. r=ato,smaug
Registering listeners for the "beforeunload" and "unload" events currently
happens on the global window and document. This actually prevents Firefox
from adding those pages to the bfcache.

The correct is to add all the listeners to the tabchildglobal, which is
the framescript itself. Also by using the capture and not the bubble phase
the unload events are correctly propagaded to our registered listeners.

MozReview-Commit-ID: 4hJjuqWsoBP

--HG--
extra : rebase_source : 619a8c936f613823dab2387efa67dc65488fbbc3
2017-10-25 14:15:30 +02:00
Andreas Tolfsen 9644ecd998 Bug 1410799 - Catch error from element.Store#get in clickElement r=whimboo
Because the content frame script's clickElement function uses
the old-style despatch technique, all code lines that have the
potential of throwing must be encapsualted in try...catch blocks.
Bug 1400256 accidentally moved them outside this block, and we did
not have any tests for stale elements in web content.

This ensures errors from WebElement.fromJSON and seenEls.get get
returned to the WebDriver service in testing/marionette/driver.js.

MozReview-Commit-ID: 49qjWhXWy69

--HG--
extra : rebase_source : 3e1b639ad253c3fe7eda890de04608a925e256f5
2017-11-01 18:06:21 +00:00
Mark Banner 4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01:00
Andreas Tolfsen c8ef9c9e6b Bug 1400256 - Adapt actions for implicitly unmarshaled elements. r=automatedtester
Since web element references are now implicitly unmarshaled when
they are passed to the content frame script, there is no need for
the actions module to check that the element origin is a reference
and try to look it up from the known element store.

MozReview-Commit-ID: 3BGBIBQMtR3

--HG--
extra : rebase_source : 1505fe15b060f85ad34628f34f67cfe96aaaa9c1
2017-10-09 19:55:27 +01:00
Andreas Tolfsen 84d01f24d6 Bug 1400256 - Marshal IPC messages to and from frame script. r=whimboo
MozReview-Commit-ID: BTDQDvu2pVE

--HG--
extra : rebase_source : 03f6c064dd0dbe973750cb5cfe5f9ae4ea86aee3
2017-10-05 17:57:17 +01:00
Andreas Tolfsen d9dd4eae1b Bug 1405018 - Consider current browsing context on staleness check. r=whimboo
The element.isStale function does not take into account the current
browsing context when checking an element’s staleness.  This means,
for example, that an element in an <iframe> that gets retrieved, will
still be considered valid for as long as its associated document lives.

In WebDriver the expected behaviour is for the element reference to
only be valid for the current browsing context, meaning retrieving
the element reference when another browsing context is chosen should
return a stale element error.

Fixes: https://github.com/mozilla/geckodriver/issues/934
MozReview-Commit-ID: JpQVt78u5AN
2017-10-10 15:06:21 +01:00
Andreas Tolfsen d28ce13224 Bug 1405279 - Remove unused variables. r=whimboo
MozReview-Commit-ID: CmiDVCw6xVK

--HG--
extra : rebase_source : e71cfb7da973d95c796a93cc1e4da6f709acf65e
2017-10-03 14:35:47 +01:00
Andreas Tolfsen 9ac995ab12 Bug 1400225 - Subscribe to and relay web content DOM events. r=automatedtester,whimboo
This makes it possible to subscribe to DOM events in web content, in
order to facilitate fixes for cases such as https://bugzil.la/1397007.

Although the current interface, WebElementEventTarget, is associated with
browser.Context (curBrowser) it is the intention that we in the future
will associate this with representations of the marshaled web element.
This will make it quack and act like an Element's EventTarget, which
has nice parity to it.

The WebElementEventTarget works by passing IPC messages to
a backend service in the content frame script implemented by
ContentEventObserverService.  This registers event handlers for specific
DOM events, and relays these events back to the browser-specific message
handler in chrome.

This will enable chrome code to wait for events to occur in content,
like this:

	await new Promise(resolve => {
	  webElement.addEventListener("visibilitychange", resolve, {once: true});
	  contentBrowser.minimize();
	});

MozReview-Commit-ID: B8MMHyG8n04

--HG--
extra : rebase_source : 25ac77fbcfb09435325719ac61614c4a8ce37996
2017-09-15 17:07:41 +01:00
Henrik Skupin 269febe5eb Bug 1387470 - Use moz:webdriverClick capability for spec conforming element click. r=ato
To allow geckodriver to temporarily opt-in for using the webdriver
conforming click, a new custom capability has to be created for
Marionette. If not specified the legacy clickElement method will
be used instead.

MozReview-Commit-ID: LuyTjLJXMGL

--HG--
extra : rebase_source : 8e133fb2d9767ea580468013fedff5233fd8eb93
2017-09-01 17:11:35 +02:00
Andreas Tolfsen 29f6ebe13f Bug 1394881 - Use Node.isConnected for web element staleness check. r=automatedtester
It turns out that Node.isConnected (described in
https://dom.spec.whatwg.org/#dom-node-isconnected) handles an element’s
shadow root, which element.isDisconnected tries to replicate.

element.isDisconnected and element.isStale are both long and error-prone
and can be removed entirely in favour of this web platform API.

The relevant change to the WebDriver specification landed in
32a477b023.

MozReview-Commit-ID: 5Q0gWLvw8KL

--HG--
extra : rebase_source : 773ab302df27cf11be6079f918a48d3730ceb5c1
2017-08-30 14:22:39 +01:00
Andreas Tolfsen aeb61b530d Bug 1395176 - Lint testing/marionette for var usage. r=automatedtester
MozReview-Commit-ID: FCcyuUVJC7J

--HG--
extra : rebase_source : b6f16c2b2118aff532dd7480304bcd94aa739148
2017-08-30 17:38:23 +01:00
Andreas Tolfsen f0f4363e58 Bug 1392318 - Use fromJSON convention in action module. r=automatedtester
The convention is to use fromJSON (instead of fromJson) because this
gives parity to toJSON which is supported by JSON.stringify.

MozReview-Commit-ID: 9dX14pFO2Bj

--HG--
extra : rebase_source : d0c1d657eee1f84d34e5a7116d8bb9ca579c8b51
2017-08-21 18:00:31 +01:00
Andreas Tolfsen fca9551967 Bug 1392281 - Pass window global to action module instead of container. r=automatedtester
Various functions in the action module take a container object such as

	{frame: <WindowProxy global>, shadowRoot: <Element>}

when it in fact never uses the shadowRoot entry.  As part of the new
window tracking we will get rid of the container concept altogether.

Because the action module is sufficiently self-contained, we can start
with removing it from there already.

MozReview-Commit-ID: KeeNF08mqnX

--HG--
extra : rebase_source : 51eee50a648a994fab456adf4add46c91a6c82a3
2017-08-21 17:34:23 +01:00
Andreas Tolfsen 6c36c123e0 Bug 1391952 - Lint testing/marionette. r=automatedtester
MozReview-Commit-ID: CdA2gkIaul7

--HG--
extra : rebase_source : a3c4b785da01c19d8ef41cb3628a4844ec518ca2
2017-08-19 14:22:17 +01:00
Andreas Tolfsen b5560cd3ea Bug 1388082 - Convert content script to async/await. r=automatedtester
MozReview-Commit-ID: GHyhwa91L73

--HG--
extra : rebase_source : 9c82555641ca4ee3e496d35fd76fa24d7ba60e37
2017-08-07 18:59:45 +01:00
Henrik Skupin e051e64a33 Bug 1386977 - Handle popstate events for page loads. r=automatedtester
In case of websites manipulating the browser's history via history.pushState
there will be no usual page load events fired. Instead listeners for popstate
events have to be used.

When such an event occurs we can directly return because the browser will
not load the underlying page. This only happens when navigating to another
page first, or restarting Firefox.

MozReview-Commit-ID: 3PceeYK9Co7

--HG--
extra : rebase_source : 30c162f72279712920a96ebc2076db27d01c41b6
2017-08-08 19:48:35 +02:00
Andreas Tolfsen d29f92675d Bug 1385547 - Lint testing/marionette. r=automatedtester
Automatic fixes from './mach lint --fix testing/marionette'.

MozReview-Commit-ID: 4UOLrLLxMbH
2017-07-31 16:01:12 +01:00
Andreas Tolfsen dd7a57fd22 Bug 1384517 - Fix testing/marionette API docs; r=automatedtester
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.

MozReview-Commit-ID: F9duuQoOYBt

--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
2017-07-26 13:11:53 +01:00
Henrik Skupin bfe7ce4555 Bug 1368434 - Fix race condition for slow frame script registrations. r=automatedtester
In some cases the registration of the frame script takes longer and as
result the page load events for DOMContentLoaded and pageshow are
missed. With that the current command waits forever and causes a page
load timeout error after 300s.

By checking the readyState of the document before the listeners are
getting attached, we can ensure to return immediately if the document
has already been finished loading.

MozReview-Commit-ID: 17f6jVz7sZZ

--HG--
extra : rebase_source : 1cc27fc9bd4d9b4a39607f8d44692dfc7095b2d7
2017-07-18 15:00:37 +02:00
Henrik Skupin 3dd4e99bb1 Bug 1374672 - Don't wait for page load events for identical hash parameters. r=automatedtester
If the target URL has the exact same hash parameter as the current URL no
page load will happen. As such Marionette should not wait for the appropriate
events.

MozReview-Commit-ID: LNbGJQgChya

--HG--
extra : rebase_source : a775f090c9c4e558803af80078c3eb3bf79fa583
2017-07-07 17:34:27 +02:00
Henrik Skupin 348b0413f0 Bug 1374672 - Return early if event for page load is uninteresting. r=automatedtester
While observing page loads the only interesting events are for the
current browsing context, and its document. While most events have
the document as target, and bubble up, the hashchange event only
fires for the window.

MozReview-Commit-ID: CiqkV4DuH48

--HG--
extra : rebase_source : b7bb9c2b3e4d591cbe700f627cdadd9a232ddbf5
2017-07-07 16:38:41 +02:00
Henrik Skupin 29253dbd89 Bug 1374672 - Use documentURI instead of baseURI. r=automatedtester
baseURI isn't actually we have to check for to get the
current documents URI. Therefore documentURI exists.

MozReview-Commit-ID: CDhOZ8lU2qJ

--HG--
extra : rebase_source : c53f79468a7d319bd5e7aa40338fce0ca7299bd4
2017-07-07 15:36:08 +02:00
Henrik Skupin 618082fc0c Bug 1332122 - Re-register the browser for frame script reloads. r=automatedtester
With multi-processes for content reloads of the frame script
can happen at any time, and not only for remoteness changes.
As such the current browser has to be re-registered with the
new id of the listener.

MozReview-Commit-ID: 48MOZfuPTR9

--HG--
extra : rebase_source : 60e91ae7e1cdc942d0ac9a9dd3aac3baeccc5ddf
2017-07-06 18:02:19 +02:00
Henrik Skupin 3aa7fa87be Bug 1368439 - Retrieve content browser title via parent process. r=automatedtester
To retrieve the title of the currently selected content browser
it is not necessary to call into the frame script. Instead just
take the value from the parent process directly.

MozReview-Commit-ID: KEpYKLIydrJ

--HG--
extra : rebase_source : 8b179de7057f8655a81656bd4d95b1562edb9f54
2017-07-02 04:31:18 -07:00
Henrik Skupin 2af21d96fe Bug 1368439 - Remove unused GetAppCacheStatus command. r=automatedtester
MozReview-Commit-ID: ARETprd7n8t

--HG--
extra : rebase_source : cacb5051de689f73156f4460bcd47de0f09f2df1
2017-07-02 13:55:12 +02:00
Andreas Tolfsen de001d80b7 Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN

--HG--
extra : rebase_source : d4e25369418cc72a6ee9f78d44b050a87403391d
2017-06-29 16:40:24 -07:00
Andreas Tolfsen ed364ef1d6 Bug 1376128 - Avoid use of proprietary catch-if statement; r=automatedtester
Whilst try...catch (e if foo) { ... } is a very nice construct, it has
not been standardised and we should avoid using non-web platform features.

MozReview-Commit-ID: 9qzHtBdlPfw

--HG--
extra : rebase_source : be27a3d647eba2d48721c77dabe12ca13278bda9
2017-06-28 11:22:29 -07:00
Andreas Tolfsen b86d19c98a Bug 1376128 - Expose unrecognised eslint globals; r=automatedtester
In particular, XPCNativeWrapper should probably be made available
by default.

MozReview-Commit-ID: E1oYFyApbLi

--HG--
extra : rebase_source : 4e27ad6882bd4e43dadc97d4fd2a186e01510dfd
2017-06-28 11:04:14 -07:00
Andreas Tolfsen 54c2f296a7 Bug 1376128 - Use selective imports from error module; r=automatedtester
Instead of importing everything from the testing/marionette/error.js
module into the global scope, we need to be selective about what symbols
we want.

MozReview-Commit-ID: HZDAS0bs0GD

--HG--
extra : rebase_source : 14a300bb2cedc0716168d50846755a6faed83012
2017-06-28 11:01:49 -07:00
Henrik Skupin a4b02086a1 Bug 1223277 - Reorder global JS module imports in listener.js. r=ato
Reorder imports so that global ones are done before local imports.

MozReview-Commit-ID: 7xA9XQlxlj4

--HG--
extra : rebase_source : b144401c5c6c47e87beab669f76f2b61fb79e5b6
2017-05-24 21:44:04 +02:00
Henrik Skupin 3b32d01243 Bug 1223277 - Log outer window id of the content window when framescript is registered. r=ato
It will help a lot for debugging when the outer window id of the
content window gets logged when the frame script gets registered.

MozReview-Commit-ID: D64A1nPEs6l

--HG--
extra : rebase_source : 0e592e10cb1a0979f4331b92dbfcfc905e737120
2017-05-19 11:16:38 +02:00
James Graham 5fd8e99e6a Bug 1363428 - Add reftest-specific endpoints to Marionette, r=ato
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.

The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.

For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.

MozReview-Commit-ID: JOFvtmH7tg
2017-06-24 12:03:11 +01:00
Wes Kocher ea40157e54 Backed out 16 changesets (bug 1363428) for Wr failures a=backout CLOSED TREE
Backed out changeset e86d6d5c2a25 (bug 1363428)
Backed out changeset a0687a63e7b9 (bug 1363428)
Backed out changeset 858dc97498c7 (bug 1363428)
Backed out changeset 582a8dce7932 (bug 1363428)
Backed out changeset 26ae2fd48587 (bug 1363428)
Backed out changeset 7fa8e20fe001 (bug 1363428)
Backed out changeset 829c13a75667 (bug 1363428)
Backed out changeset a94d2c400b04 (bug 1363428)
Backed out changeset ec4a6b343b37 (bug 1363428)
Backed out changeset c27b94038e71 (bug 1363428)
Backed out changeset d1c03b96d270 (bug 1363428)
Backed out changeset 60c1c95b46ca (bug 1363428)
Backed out changeset b0604d88973f (bug 1363428)
Backed out changeset f0b218979773 (bug 1363428)
Backed out changeset 1d359561373c (bug 1363428)
Backed out changeset 956d6c0a646e (bug 1363428)

MozReview-Commit-ID: K8EBA8ACZLC
2017-06-23 14:13:27 -07:00
James Graham c9e960f859 Bug 1363428 - Add reftest-specific endpoints to Marionette, r=ato
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.

The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.

For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.

MozReview-Commit-ID: JOFvtmH7tg

--HG--
extra : rebase_source : ab5a2ef2e450b9bbdc6bc3c9487ed5dfda2c1d4b
2017-05-10 10:51:10 +01:00
Ryan VanderMeulen dacc2546ba Backed out 6 changesets (bug 1223277) for causing Marionette test regressions.
Backed out changeset 85c86dc86122 (bug 1223277)
Backed out changeset aacd8d27b192 (bug 1223277)
Backed out changeset e6921a7229a3 (bug 1223277)
Backed out changeset b9f95fc81d23 (bug 1223277)
Backed out changeset 547744157e2a (bug 1223277)
Backed out changeset afbaa1138de3 (bug 1223277)
2017-06-23 12:15:23 -04:00