OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 package org.chromium.chrome.test; | 5 package org.chromium.chrome.test; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.os.Bundle; | 8 import android.os.Bundle; |
9 import android.os.Environment; | 9 import android.os.Environment; |
10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
11 import android.util.Log; | 11 import android.util.Log; |
12 | 12 |
13 import junit.framework.TestCase; | 13 import junit.framework.TestCase; |
14 | 14 |
15 import org.chromium.base.test.BaseInstrumentationTestRunner; | 15 import org.chromium.base.test.BaseInstrumentationTestRunner; |
16 import org.chromium.base.test.BaseTestResult; | 16 import org.chromium.base.test.BaseTestResult; |
17 import org.chromium.base.test.BaseTestResult.SkipCheck; | |
18 import org.chromium.base.test.util.Restriction; | 17 import org.chromium.base.test.util.Restriction; |
| 18 import org.chromium.base.test.util.SkipCheck; |
19 import org.chromium.chrome.browser.util.FeatureUtilities; | 19 import org.chromium.chrome.browser.util.FeatureUtilities; |
20 import org.chromium.chrome.test.util.DisableInTabbedMode; | 20 import org.chromium.chrome.test.util.DisableInTabbedMode; |
21 import org.chromium.net.test.BaseHttpTestServer; | 21 import org.chromium.net.test.BaseHttpTestServer; |
22 import org.chromium.policy.test.annotations.Policies; | 22 import org.chromium.policy.test.annotations.Policies; |
23 import org.chromium.ui.base.DeviceFormFactor; | 23 import org.chromium.ui.base.DeviceFormFactor; |
24 | 24 |
25 import java.io.File; | 25 import java.io.File; |
26 import java.io.IOException; | 26 import java.io.IOException; |
27 import java.lang.reflect.Method; | 27 import java.lang.reflect.Method; |
28 import java.net.Socket; | 28 import java.net.Socket; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 && !DeviceFormFactor.isTablet(getTargetContext())) { | 230 && !DeviceFormFactor.isTablet(getTargetContext())) { |
231 return true; | 231 return true; |
232 } | 232 } |
233 return false; | 233 return false; |
234 } | 234 } |
235 } | 235 } |
236 | 236 |
237 /** | 237 /** |
238 * Checks for tests that should only run in document mode. | 238 * Checks for tests that should only run in document mode. |
239 */ | 239 */ |
240 private class DisableInTabbedModeSkipCheck implements SkipCheck { | 240 private class DisableInTabbedModeSkipCheck extends SkipCheck { |
241 | 241 |
242 /** | 242 /** |
243 * If the test is running in tabbed mode, checks for | 243 * If the test is running in tabbed mode, checks for |
244 * {@link org.chromium.chrome.test.util.DisableInTabbedMode}. | 244 * {@link org.chromium.chrome.test.util.DisableInTabbedMode}. |
245 * | 245 * |
246 * @param testCase The test to check. | 246 * @param testCase The test to check. |
247 * @return Whether the test is running in tabbed mode and has been marke
d as disabled in | 247 * @return Whether the test is running in tabbed mode and has been marke
d as disabled in |
248 * tabbed mode. | 248 * tabbed mode. |
249 */ | 249 */ |
250 @Override | 250 @Override |
(...skipping 10 matching lines...) Expand all Loading... |
261 } | 261 } |
262 } | 262 } |
263 } catch (NoSuchMethodException e) { | 263 } catch (NoSuchMethodException e) { |
264 Log.e(TAG, "Couldn't find test method: " + e.toString()); | 264 Log.e(TAG, "Couldn't find test method: " + e.toString()); |
265 } | 265 } |
266 | 266 |
267 return false; | 267 return false; |
268 } | 268 } |
269 } | 269 } |
270 } | 270 } |
OLD | NEW |