зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1355147 - Fix test moving to negative coordinates in headless mac. r=whimboo
Expose if the browser is headless to marionette session capabilities so the tests can check headless behavior. MozReview-Commit-ID: 10va2Iv2ytO
This commit is contained in:
Родитель
82161df837
Коммит
465c6d492e
|
@ -82,10 +82,16 @@ class TestPosition(MarionetteTestCase):
|
|||
|
||||
os = self.marionette.session_capabilities["platformName"]
|
||||
|
||||
# Regardless of platform, headless always supports being positioned
|
||||
# off-screen.
|
||||
if self.marionette.session_capabilities["moz:headless"]:
|
||||
self.assertEqual(-8, position["x"])
|
||||
self.assertEqual(-8, position["y"])
|
||||
|
||||
# Certain WMs prohibit windows from being moved off-screen,
|
||||
# but we don't have this information. It should be safe to
|
||||
# assume a window can be moved to (0,0) or less.
|
||||
if os == "linux":
|
||||
elif os == "linux":
|
||||
# certain WMs prohibit windows from being moved off-screen
|
||||
self.assertLessEqual(position["x"], 0)
|
||||
self.assertLessEqual(position["y"], 0)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {interfaces: Ci, utils: Cu} = Components;
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
Cu.import("resource://gre/modules/Preferences.jsm");
|
||||
|
@ -267,6 +267,7 @@ session.Capabilities = class extends Map {
|
|||
["moz:processID", Services.appinfo.processID],
|
||||
["moz:profile", maybeProfile()],
|
||||
["moz:accessibilityChecks", false],
|
||||
["moz:headless", Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo).isHeadless],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче