зеркало из https://github.com/mozilla/gecko-dev.git
bug 648104 - reftest failures on desktop - can't drawWindow remote content fails r=jmaher, cjones
This commit is contained in:
Родитель
af03a290b1
Коммит
dbb2b3abf3
|
@ -65,6 +65,7 @@ const NS_OBSERVER_SERVICE_CONTRACTID =
|
|||
var gLoadTimeout = 0;
|
||||
var gTimeoutHook = null;
|
||||
var gRemote = false;
|
||||
var gIgnoreWindowSize = false;
|
||||
var gTotalChunks = 0;
|
||||
var gThisChunk = 0;
|
||||
|
||||
|
@ -273,6 +274,7 @@ function InitAndStartRefTests()
|
|||
}
|
||||
}
|
||||
gRemote = prefs.getBoolPref("reftest.remote");
|
||||
gIgnoreWindowSize = prefs.getBoolPref("reftest.ignoreWindowSize");
|
||||
}
|
||||
catch(e) {
|
||||
gLoadTimeout = 5 * 60 * 1000; //5 minutes as per bug 479518
|
||||
|
@ -999,10 +1001,11 @@ function DoDrawWindow(ctx, x, y, w, h)
|
|||
{
|
||||
var flags = ctx.DRAWWINDOW_DRAW_CARET | ctx.DRAWWINDOW_DRAW_VIEW;
|
||||
var testRect = gBrowser.getBoundingClientRect();
|
||||
if (0 <= testRect.left &&
|
||||
0 <= testRect.top &&
|
||||
window.innerWidth >= testRect.right &&
|
||||
window.innerHeight >= testRect.bottom) {
|
||||
if (gIgnoreWindowSize ||
|
||||
(0 <= testRect.left &&
|
||||
0 <= testRect.top &&
|
||||
window.innerWidth >= testRect.right &&
|
||||
window.innerHeight >= testRect.bottom)) {
|
||||
// We can use the window's retained layer manager
|
||||
// because the window is big enough to display the entire
|
||||
// browser element
|
||||
|
|
|
@ -407,12 +407,13 @@ def main():
|
|||
print "ERROR: Invalid options specified, use --help for a list of valid options"
|
||||
sys.exit(1)
|
||||
|
||||
parts = dm.getInfo('screen')['screen'][0].split()
|
||||
width = int(parts[0].split(':')[1])
|
||||
height = int(parts[1].split(':')[1])
|
||||
if (width < 1050 or height < 1050):
|
||||
print "ERROR: Invalid screen resolution %sx%s, please adjust to 1366x1050 or higher" % (width, height)
|
||||
sys.exit(1)
|
||||
if not options.ignoreWindowSize:
|
||||
parts = dm.getInfo('screen')['screen'][0].split()
|
||||
width = int(parts[0].split(':')[1])
|
||||
height = int(parts[1].split(':')[1])
|
||||
if (width < 1050 or height < 1050):
|
||||
print "ERROR: Invalid screen resolution %sx%s, please adjust to 1366x1050 or higher" % (width, height)
|
||||
sys.exit(1)
|
||||
|
||||
automation.setAppName(options.app)
|
||||
automation.setRemoteProfile(options.remoteProfile)
|
||||
|
|
|
@ -88,6 +88,8 @@ class RefTest(object):
|
|||
prefsFile.write('user_pref("reftest.thisChunk", %d);\n' % options.thisChunk)
|
||||
if options.logFile != None:
|
||||
prefsFile.write('user_pref("reftest.logFile", "%s");\n' % options.logFile)
|
||||
if options.ignoreWindowSize != False:
|
||||
prefsFile.write('user_pref("reftest.ignoreWindowSize", true);\n')
|
||||
|
||||
for v in options.extraPrefs:
|
||||
thispref = v.split("=")
|
||||
|
@ -254,6 +256,11 @@ class ReftestOptions(OptionParser):
|
|||
help = "skip tests marked as slow when running")
|
||||
defaults["skipSlowTests"] = False
|
||||
|
||||
self.add_option("--ignore-window-size",
|
||||
dest = "ignoreWindowSize", action = "store_true",
|
||||
help = "ignore the window size, which may cause spurious failures and passes")
|
||||
defaults["ignoreWindowSize"] = False
|
||||
|
||||
self.add_option("--install-extension",
|
||||
action = "append", dest = "extensionsToInstall",
|
||||
help = "install the specified extension in the testing profile."
|
||||
|
|
Загрузка…
Ссылка в новой задаче