| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import logging | 5 import logging |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 from pylib import android_commands | 9 from pylib import android_commands |
| 10 from pylib import constants | 10 from pylib import constants |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 def SetUp(self): | 181 def SetUp(self): |
| 182 """Sets up necessary test enviroment for the test suite.""" | 182 """Sets up necessary test enviroment for the test suite.""" |
| 183 super(TestRunner, self).SetUp() | 183 super(TestRunner, self).SetUp() |
| 184 if _TestSuiteRequiresMockTestServer(self.test_package.suite_name): | 184 if _TestSuiteRequiresMockTestServer(self.test_package.suite_name): |
| 185 self.LaunchChromeTestServerSpawner() | 185 self.LaunchChromeTestServerSpawner() |
| 186 self.tool.SetupEnvironment() | 186 self.tool.SetupEnvironment() |
| 187 | 187 |
| 188 #override | 188 #override |
| 189 def TearDown(self): | 189 def TearDown(self): |
| 190 """Cleans up the test enviroment for the test suite.""" | 190 """Cleans up the test enviroment for the test suite.""" |
| 191 # Content shell creates a profile on the sdscard which accumulates cache | 191 self.test_package.ClearApplicationState(self.adb) |
| 192 # files over time. | |
| 193 self.adb.RunShellCommand('rm -r ' + | |
| 194 os.path.join(self.adb.GetExternalStorage(), 'content_shell'), | |
| 195 timeout_time=60 * 2) | |
| 196 self.tool.CleanUpEnvironment() | 192 self.tool.CleanUpEnvironment() |
| 197 super(TestRunner, self).TearDown() | 193 super(TestRunner, self).TearDown() |
| OLD | NEW |