Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: build/android/pylib/uiautomator/test_runner.py

Issue 107113006: [Android] Make cmdline_file argument to FlagChanger mandatory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Class for running uiautomator tests on a single device.""" 5 """Class for running uiautomator tests on a single device."""
6 6
7 from pylib import constants 7 from pylib import constants
8 from pylib.instrumentation import test_options as instr_test_options 8 from pylib.instrumentation import test_options as instr_test_options
9 from pylib.instrumentation import test_runner as instr_test_runner 9 from pylib.instrumentation import test_runner as instr_test_runner
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 def InstallTestPackage(self): 47 def InstallTestPackage(self):
48 self.test_pkg.Install(self.adb) 48 self.test_pkg.Install(self.adb)
49 49
50 #override 50 #override
51 def PushDataDeps(self): 51 def PushDataDeps(self):
52 pass 52 pass
53 53
54 #override 54 #override
55 def _RunTest(self, test, timeout): 55 def _RunTest(self, test, timeout):
56 self.adb.ClearApplicationState(self._package) 56 self.adb.ClearApplicationState(self._package)
57 if 'Feature:FirstRunExperience' in self.test_pkg.GetTestAnnotations(test): 57 if self.flags:
58 self.flags.RemoveFlags(['--disable-fre']) 58 if 'Feature:FirstRunExperience' in self.test_pkg.GetTestAnnotations(test):
59 else: 59 self.flags.RemoveFlags(['--disable-fre'])
60 self.flags.AddFlags(['--disable-fre']) 60 else:
61 self.flags.AddFlags(['--disable-fre'])
61 self.adb.StartActivity(self._package, 62 self.adb.StartActivity(self._package,
62 self._activity, 63 self._activity,
63 wait_for_completion=True, 64 wait_for_completion=True,
64 action='android.intent.action.MAIN', 65 action='android.intent.action.MAIN',
65 force_stop=True) 66 force_stop=True)
66 return self.adb.RunUIAutomatorTest( 67 return self.adb.RunUIAutomatorTest(
67 test, self.test_pkg.GetPackageName(), timeout) 68 test, self.test_pkg.GetPackageName(), timeout)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698