OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 package org.chromium.content_browsertests_apk; | 5 package org.chromium.content_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 content browser tests | 15 * Android activity for running content browser tests |
16 */ | 16 */ |
17 public class ContentBrowserTestsActivity extends ContentShellBrowserTestActivity
{ | 17 public class ContentBrowserTestsActivity extends ContentShellBrowserTestActivity
{ |
18 private static final String TAG = "cr.native_test"; | 18 private static final String TAG = "cr.native_test"; |
19 | 19 |
20 @Override | 20 @Override |
21 public void onCreate(Bundle savedInstanceState) { | 21 public void onCreate(Bundle savedInstanceState) { |
22 super.onCreate(savedInstanceState); | 22 super.onCreate(savedInstanceState); |
23 appendCommandLineFlags( | 23 appendCommandLineFlags( |
24 "--remote-debugging-socket-name content_browsertests_devtools_re
mote"); | 24 "--remote-debugging-socket-name content_browsertests_devtools_re
mote"); |
25 } | 25 } |
26 | 26 |
27 @Override | 27 @Override |
28 protected File getPrivateDataDirectory() { | 28 protected File getPrivateDataDirectory() { |
29 return new File(PathUtils.getExternalStorageDirectory(), | 29 // TODO(agrieve): We should not be touching the side-loaded test data di
rectory. |
| 30 // https://crbug.com/617734 |
| 31 return new File(UrlUtils.getIsolatedTestRoot(), |
30 ContentBrowserTestsApplication.PRIVATE_DATA_DIRECTORY_SUFFIX); | 32 ContentBrowserTestsApplication.PRIVATE_DATA_DIRECTORY_SUFFIX); |
31 } | 33 } |
32 | 34 |
33 @Override | 35 @Override |
34 protected int getTestActivityViewId() { | 36 protected int getTestActivityViewId() { |
35 return R.layout.test_activity; | 37 return R.layout.test_activity; |
36 } | 38 } |
37 | 39 |
38 @Override | 40 @Override |
39 protected int getShellManagerViewId() { | 41 protected int getShellManagerViewId() { |
40 return R.id.shell_container; | 42 return R.id.shell_container; |
41 } | 43 } |
42 | 44 |
43 } | 45 } |
OLD | NEW |