зеркало из 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 gLoadTimeout = 0;
|
||||||
var gTimeoutHook = null;
|
var gTimeoutHook = null;
|
||||||
var gRemote = false;
|
var gRemote = false;
|
||||||
|
var gIgnoreWindowSize = false;
|
||||||
var gTotalChunks = 0;
|
var gTotalChunks = 0;
|
||||||
var gThisChunk = 0;
|
var gThisChunk = 0;
|
||||||
|
|
||||||
|
@ -273,6 +274,7 @@ function InitAndStartRefTests()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gRemote = prefs.getBoolPref("reftest.remote");
|
gRemote = prefs.getBoolPref("reftest.remote");
|
||||||
|
gIgnoreWindowSize = prefs.getBoolPref("reftest.ignoreWindowSize");
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
gLoadTimeout = 5 * 60 * 1000; //5 minutes as per bug 479518
|
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 flags = ctx.DRAWWINDOW_DRAW_CARET | ctx.DRAWWINDOW_DRAW_VIEW;
|
||||||
var testRect = gBrowser.getBoundingClientRect();
|
var testRect = gBrowser.getBoundingClientRect();
|
||||||
if (0 <= testRect.left &&
|
if (gIgnoreWindowSize ||
|
||||||
0 <= testRect.top &&
|
(0 <= testRect.left &&
|
||||||
window.innerWidth >= testRect.right &&
|
0 <= testRect.top &&
|
||||||
window.innerHeight >= testRect.bottom) {
|
window.innerWidth >= testRect.right &&
|
||||||
|
window.innerHeight >= testRect.bottom)) {
|
||||||
// We can use the window's retained layer manager
|
// We can use the window's retained layer manager
|
||||||
// because the window is big enough to display the entire
|
// because the window is big enough to display the entire
|
||||||
// browser element
|
// browser element
|
||||||
|
|
|
@ -407,12 +407,13 @@ def main():
|
||||||
print "ERROR: Invalid options specified, use --help for a list of valid options"
|
print "ERROR: Invalid options specified, use --help for a list of valid options"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
parts = dm.getInfo('screen')['screen'][0].split()
|
if not options.ignoreWindowSize:
|
||||||
width = int(parts[0].split(':')[1])
|
parts = dm.getInfo('screen')['screen'][0].split()
|
||||||
height = int(parts[1].split(':')[1])
|
width = int(parts[0].split(':')[1])
|
||||||
if (width < 1050 or height < 1050):
|
height = int(parts[1].split(':')[1])
|
||||||
print "ERROR: Invalid screen resolution %sx%s, please adjust to 1366x1050 or higher" % (width, height)
|
if (width < 1050 or height < 1050):
|
||||||
sys.exit(1)
|
print "ERROR: Invalid screen resolution %sx%s, please adjust to 1366x1050 or higher" % (width, height)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
automation.setAppName(options.app)
|
automation.setAppName(options.app)
|
||||||
automation.setRemoteProfile(options.remoteProfile)
|
automation.setRemoteProfile(options.remoteProfile)
|
||||||
|
|
|
@ -88,6 +88,8 @@ class RefTest(object):
|
||||||
prefsFile.write('user_pref("reftest.thisChunk", %d);\n' % options.thisChunk)
|
prefsFile.write('user_pref("reftest.thisChunk", %d);\n' % options.thisChunk)
|
||||||
if options.logFile != None:
|
if options.logFile != None:
|
||||||
prefsFile.write('user_pref("reftest.logFile", "%s");\n' % options.logFile)
|
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:
|
for v in options.extraPrefs:
|
||||||
thispref = v.split("=")
|
thispref = v.split("=")
|
||||||
|
@ -254,6 +256,11 @@ class ReftestOptions(OptionParser):
|
||||||
help = "skip tests marked as slow when running")
|
help = "skip tests marked as slow when running")
|
||||||
defaults["skipSlowTests"] = False
|
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",
|
self.add_option("--install-extension",
|
||||||
action = "append", dest = "extensionsToInstall",
|
action = "append", dest = "extensionsToInstall",
|
||||||
help = "install the specified extension in the testing profile."
|
help = "install the specified extension in the testing profile."
|
||||||
|
|
Загрузка…
Ссылка в новой задаче