mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
3421774080
Message sequencing allows Marionette to provide an asynchronous, parallel pipelining user-facing interface, limit chances of payload race conditions, and remove stylistic inconsistencies in how commands and responses are dispatched internally. Clients that deliver a blocking WebDriver interface are still be expected to not send further command requests before the response from the last command has come back, but if they still happen to do so because of programming error or otherwise, no harm will be done. This will guard against bugs such as bug 1207125. This patch formalises the command and response concepts, and applies these concepts to emulator callbacks. Through the new message format, Marionette is able to provide two-way parallel communication. In other words, the server will be able to instruct the client to perform a command in a non ad-hoc way. runEmulatorCmd and runEmulatorShell are both turned into command instructions originating from the server. This resolves a lot of technical debt in the server code because they are no longer special-cased to circumvent the dispatching technique used for all other commands; commands may originate from either the client or the server providing parallel pipelining enforced through message sequencing: client server | | msgid=1 |----------->| | command | | | msgid=2 |<-----------| | command | | | msgid=2 |----------->| | response | | | msgid=1 |<-----------| | response | | | The protocol now consists of a "Command" message and the corresponding "Response" message. A "Response" message must always be sent in reply to a "Command" message. This bumps the Marionette protocol level to 3. r=dburns r=jgriffin --HG-- extra : commitid : 1kz4Oa2q3Un
45 lines
2.1 KiB
Plaintext
45 lines
2.1 KiB
Plaintext
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
marionette.jar:
|
|
% content marionette %content/
|
|
content/server.js (server.js)
|
|
content/driver.js (driver.js)
|
|
content/actions.js (actions.js)
|
|
content/listener.js (listener.js)
|
|
content/elements.js (elements.js)
|
|
content/sendkeys.js (sendkeys.js)
|
|
content/common.js (common.js)
|
|
content/simpletest.js (simpletest.js)
|
|
content/frame-manager.js (frame-manager.js)
|
|
content/EventUtils.js (EventUtils.js)
|
|
content/ChromeUtils.js (ChromeUtils.js)
|
|
content/error.js (error.js)
|
|
content/message.js (message.js)
|
|
content/dispatcher.js (dispatcher.js)
|
|
content/emulator.js (emulator.js)
|
|
content/modal.js (modal.js)
|
|
content/proxy.js (proxy.js)
|
|
content/capture.js (capture.js)
|
|
content/cookies.js (cookies.js)
|
|
#ifdef ENABLE_TESTS
|
|
content/test.xul (client/marionette/chrome/test.xul)
|
|
content/test2.xul (client/marionette/chrome/test2.xul)
|
|
content/test_nested_iframe.xul (client/marionette/chrome/test_nested_iframe.xul)
|
|
content/test_anonymous_content.xul (client/marionette/chrome/test_anonymous_content.xul)
|
|
#endif
|
|
|
|
% content specialpowers %content/
|
|
content/specialpowers.js (../specialpowers/content/specialpowers.js)
|
|
content/SpecialPowersObserver.jsm (../specialpowers/content/SpecialPowersObserver.jsm)
|
|
* content/specialpowersAPI.js (../specialpowers/content/specialpowersAPI.js)
|
|
content/SpecialPowersObserverAPI.js (../specialpowers/content/SpecialPowersObserverAPI.js)
|
|
content/ChromePowers.js (../mochitest/tests/SimpleTest/ChromePowers.js)
|
|
content/MozillaLogger.js (../specialpowers/content/MozillaLogger.js)
|
|
content/MockFilePicker.jsm (../specialpowers/content/MockFilePicker.jsm)
|
|
content/MockColorPicker.jsm (../specialpowers/content/MockColorPicker.jsm)
|
|
content/MockPermissionPrompt.jsm (../specialpowers/content/MockPermissionPrompt.jsm)
|
|
content/MockPaymentsUIGlue.jsm (../specialpowers/content/MockPaymentsUIGlue.jsm)
|
|
content/Assert.jsm (../modules/Assert.jsm)
|