Bug 797628 - Use a 320x480 emulator by default, r=ahal

This commit is contained in:
Jonathan Griffin 2013-02-11 12:41:32 -08:00
Родитель 6db1265f0c
Коммит 691bd2d328
4 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -42,9 +42,10 @@ class LogcatProc(ProcessHandlerMixin):
class Emulator(object): class Emulator(object):
deviceRe = re.compile(r"^emulator-(\d+)(\s*)(.*)$") deviceRe = re.compile(r"^emulator-(\d+)(\s*)(.*)$")
_default_res = '320x480'
def __init__(self, homedir=None, noWindow=False, logcat_dir=None, def __init__(self, homedir=None, noWindow=False, logcat_dir=None,
arch="x86", emulatorBinary=None, res='480x800', sdcard=None, arch="x86", emulatorBinary=None, res=None, sdcard=None,
userdata=None): userdata=None):
self.port = None self.port = None
self.dm = None self.dm = None
@ -60,7 +61,7 @@ class Emulator(object):
self.logcat_proc = None self.logcat_proc = None
self.arch = arch self.arch = arch
self.binary = emulatorBinary self.binary = emulatorBinary
self.res = res self.res = res or self._default_res
self.battery = EmulatorBattery(self) self.battery = EmulatorBattery(self)
self.geo = EmulatorGeo(self) self.geo = EmulatorGeo(self)
self.screen = EmulatorScreen(self) self.screen = EmulatorScreen(self)

Просмотреть файл

@ -115,7 +115,7 @@ class Marionette(object):
def __init__(self, host='localhost', port=2828, bin=None, profile=None, def __init__(self, host='localhost', port=2828, bin=None, profile=None,
emulator=None, sdcard=None, emulatorBinary=None, emulator=None, sdcard=None, emulatorBinary=None,
emulatorImg=None, emulator_res='480x800', gecko_path=None, emulatorImg=None, emulator_res=None, gecko_path=None,
connectToRunningEmulator=False, homedir=None, baseurl=None, connectToRunningEmulator=False, homedir=None, baseurl=None,
noWindow=False, logcat_dir=None, busybox=None): noWindow=False, logcat_dir=None, busybox=None):
self.host = host self.host = host

Просмотреть файл

@ -584,7 +584,7 @@ def parse_options():
help = "Use a specific image file instead of a fresh one") help = "Use a specific image file instead of a fresh one")
parser.add_option('--emulator-res', parser.add_option('--emulator-res',
action = 'store', dest = 'emulator_res', action = 'store', dest = 'emulator_res',
default = '480x800', type= 'str', default = None, type= 'str',
help = 'Set a custom resolution for the emulator. ' help = 'Set a custom resolution for the emulator. '
'Example: "480x800"') 'Example: "480x800"')
parser.add_option("--no-window", parser.add_option("--no-window",
@ -657,11 +657,12 @@ def parse_options():
# check for valid resolution string, strip whitespaces # check for valid resolution string, strip whitespaces
try: try:
dims = options.emulator_res.split('x') if options.emulator_res:
assert len(dims) == 2 dims = options.emulator_res.split('x')
width = str(int(dims[0])) assert len(dims) == 2
height = str(int(dims[1])) width = str(int(dims[0]))
options.emulator_res = 'x'.join([width, height]) height = str(int(dims[1]))
options.emulator_res = 'x'.join([width, height])
except: except:
raise ValueError('Invalid emulator resolution format. ' raise ValueError('Invalid emulator resolution format. '
'Should be like "480x800".') 'Should be like "480x800".')

Просмотреть файл

@ -221,6 +221,7 @@
"layout/forms/test/test_bug446663.html" : "bug446663_a cut - got 123, expected", "layout/forms/test/test_bug446663.html" : "bug446663_a cut - got 123, expected",
"layout/forms/test/test_bug477700.html" : "Typing should work - got , expected Test", "layout/forms/test/test_bug477700.html" : "Typing should work - got , expected Test",
"layout/forms/test/test_bug534785.html" : "timed out", "layout/forms/test/test_bug534785.html" : "timed out",
"layout/forms/test/test_bug549170.html": "Bug 843374",
"layout/forms/test/test_bug563642.html" : "timed out", "layout/forms/test/test_bug563642.html" : "timed out",
"layout/forms/test/test_bug572649.html" : "timed out", "layout/forms/test/test_bug572649.html" : "timed out",
"layout/forms/test/test_bug644542.html" : "timed out", "layout/forms/test/test_bug644542.html" : "timed out",