| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.components_browsertests_apk; | 5 package org.chromium.components_browsertests_apk; |
| 6 | 6 |
| 7 import android.os.Bundle; | 7 import android.os.Bundle; |
| 8 | 8 |
| 9 import org.chromium.base.PathUtils; | 9 import org.chromium.base.test.util.UrlUtils; |
| 10 import org.chromium.content_shell.browsertests.ContentShellBrowserTestActivity; | 10 import org.chromium.content_shell.browsertests.ContentShellBrowserTestActivity; |
| 11 | 11 |
| 12 import java.io.File; | 12 import java.io.File; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * Android activity for running components browser tests | 15 * Android activity for running components browser tests |
| 16 */ | 16 */ |
| 17 public class ComponentsBrowserTestsActivity extends ContentShellBrowserTestActiv
ity { | 17 public class ComponentsBrowserTestsActivity extends ContentShellBrowserTestActiv
ity { |
| 18 @Override | 18 @Override |
| 19 public void onCreate(Bundle savedInstanceState) { | 19 public void onCreate(Bundle savedInstanceState) { |
| 20 super.onCreate(savedInstanceState); | 20 super.onCreate(savedInstanceState); |
| 21 appendCommandLineFlags( | 21 appendCommandLineFlags( |
| 22 "--remote-debugging-socket-name components_browsertests_devtools
_remote"); | 22 "--remote-debugging-socket-name components_browsertests_devtools
_remote"); |
| 23 } | 23 } |
| 24 | 24 |
| 25 @Override | 25 @Override |
| 26 protected File getPrivateDataDirectory() { | 26 protected File getPrivateDataDirectory() { |
| 27 return new File(PathUtils.getExternalStorageDirectory(), | 27 // TODO(agrieve): We should not be touching the side-loaded test data di
rectory. |
| 28 // https://crbug.com/617734 |
| 29 return new File(UrlUtils.getIsolatedTestRoot(), |
| 28 ComponentsBrowserTestsApplication.PRIVATE_DATA_DIRECTORY_SUFFIX)
; | 30 ComponentsBrowserTestsApplication.PRIVATE_DATA_DIRECTORY_SUFFIX)
; |
| 29 } | 31 } |
| 30 | 32 |
| 31 @Override | 33 @Override |
| 32 protected int getTestActivityViewId() { | 34 protected int getTestActivityViewId() { |
| 33 return R.layout.test_activity; | 35 return R.layout.test_activity; |
| 34 } | 36 } |
| 35 | 37 |
| 36 @Override | 38 @Override |
| 37 protected int getShellManagerViewId() { | 39 protected int getShellManagerViewId() { |
| 38 return R.id.shell_container; | 40 return R.id.shell_container; |
| 39 } | 41 } |
| 40 } | 42 } |
| OLD | NEW |