зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1661332 - [marionette] Run reftests in content and not chrome context. r=marionette-reviewers,jgraham
Reftests are running inside a custom browser element, which basically is reflected as content context in Marionette. And given that some commands like "WebDriver:GetCurrentURL" rely on the correct context to be set, wrong data would be returned. To allow that all commands are working based on the custom browser element don't enforce chrome context for the Reftests code in Marionette. This change also fixes the code which counts the assertions as seen for debug builds. Until now only assertions from chrome context have been collected. Differential Revision: https://phabricator.services.mozilla.com/D88408
This commit is contained in:
Родитель
f2f47372af
Коммит
cf3974f43b
|
@ -3622,12 +3622,6 @@ GeckoDriver.prototype.setupReftest = async function(cmd) {
|
|||
);
|
||||
}
|
||||
|
||||
if (this.context !== Context.Chrome) {
|
||||
throw new error.UnsupportedOperationError(
|
||||
"Must set chrome context before running reftests"
|
||||
);
|
||||
}
|
||||
|
||||
let {
|
||||
urlCount = {},
|
||||
screenshot = "unexpected",
|
||||
|
|
|
@ -152,6 +152,7 @@ reftest.Runner = class {
|
|||
await this.driver.setWindowHandle(found, true);
|
||||
|
||||
this.lastURL = this.driver.currentURL.href;
|
||||
logger.debug(`loaded initial URL: ${this.lastURL}`);
|
||||
|
||||
let browserRect = reftestWin.gBrowser.getBoundingClientRect();
|
||||
logger.debug(`new: ${browserRect.width}x${browserRect.height}`);
|
||||
|
|
|
@ -992,7 +992,6 @@ class InternalRefTestImplementation(RefTestImplementation):
|
|||
for key, value in iteritems(
|
||||
self.executor.group_metadata.get("url_count", {}))
|
||||
if value > 1}
|
||||
self.executor.protocol.marionette.set_context(self.executor.protocol.marionette.CONTEXT_CHROME)
|
||||
self.executor.protocol.marionette._send_message("reftest:setup", data)
|
||||
|
||||
def reset(self, screenshot=None):
|
||||
|
@ -1024,7 +1023,6 @@ class InternalRefTestImplementation(RefTestImplementation):
|
|||
try:
|
||||
if self.executor.protocol.marionette and self.executor.protocol.marionette.session_id:
|
||||
self.executor.protocol.marionette._send_message("reftest:teardown", {})
|
||||
self.executor.protocol.marionette.set_context(self.executor.protocol.marionette.CONTEXT_CONTENT)
|
||||
# the reftest runner opens/closes a window with focus, so as
|
||||
# with after closing a window we need to give a new window
|
||||
# focus
|
||||
|
|
Загрузка…
Ссылка в новой задаче