@@ -51,26 +51,23 @@ UNITYSHELL_GSETTINGS_PATH = "/org/compiz/profiles/unity/plugins/unityshell/"
5151UNITYSHELL_LAUNCHER_KEY = "launcher-hide-mode"
5252UNITYSHELL_LAUNCHER_MODE = 1 # launcher hidden
5353
54−def _get_device_emulation_scenarios():
54+def _get_device_emulation_scenarios(devices='All'):
55+ nexus4 = ('Desktop Nexus 4',
56+ dict(app_width=768, app_height=1280, grid_unit_px=18))
57+ nexus10 = ('Desktop Nexus 10',
58+ dict(app_width=2560, app_height=1600, grid_unit_px=20))
59+ native = ('Native Device',
60+ dict(app_width=0, app_height=0, grid_unit_px=0))
61+
5562 if model() == 'Desktop':
56− return [
57− (
58− 'Desktop Nexus 4',
59− dict(app_width=768, app_height=1280, grid_unit_px=18)
60− ),
61− (
62− 'Desktop Nexus 10',
63− dict(app_width=2560, app_height=1600, grid_unit_px=20)
64− ),
65− ]
63+ if devices == 'All':
64+ return [nexus4, nexus10]
65+ elif devices == 'Nexus4':
66+ return [nexus4]
67+ elif devices == 'Nexus10':
68+ return [nexus10]
6669 else:
67− return [
68− (
69− 'Native Device',
70− dict(app_width=0, app_height=0, grid_unit_px=0)
71− )
72− ]
73−
70+ return [native]
7471
7572class UnityTestCase(AutopilotTestCase):
7673