Index: components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java |
diff --git a/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java b/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java |
index 098431ff845b3b64bd01d333ccb12a1570514307..1c39c75abe57970c6ea021b4b4afb48138fb1d19 100644 |
--- a/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java |
+++ b/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java |
@@ -52,34 +52,22 @@ public class CronetSampleTest extends |
} |
/** |
- * Starts the CronetSample activity and loads the given URL. The URL can be |
- * null, in which case will default to |
- * CronetSampleActivity.DEFAULT_SHELL_URL. |
+ * Starts the CronetSample activity and loads the given URL. |
*/ |
protected CronetSampleActivity launchCronetSampleWithUrl(String url) { |
- return launchCronetSampleWithUrlAndCommandLineArgs(url, null); |
- } |
- |
- /** |
- * Starts the CronetSample activity appending the provided command line |
- * arguments and loads the given URL. The URL can be null, in which case |
- * will default to CronetSampleActivity.DEFAULT_SHELL_URL. |
- */ |
- protected CronetSampleActivity launchCronetSampleWithUrlAndCommandLineArgs( |
- String url, String[] commandLineArgs) { |
Intent intent = new Intent(Intent.ACTION_MAIN); |
intent.addCategory(Intent.CATEGORY_LAUNCHER); |
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
- if (url != null) |
- intent.setData(Uri.parse(url)); |
+ intent.setData(Uri.parse(url)); |
intent.setComponent(new ComponentName( |
getInstrumentation().getTargetContext(), |
CronetSampleActivity.class)); |
- if (commandLineArgs != null) { |
- intent.putExtra(CronetSampleActivity.COMMAND_LINE_ARGS_KEY, |
- commandLineArgs); |
- } |
setActivityIntent(intent); |
+ try { |
+ waitForActiveShellToBeDoneLoading(); |
+ } catch (Throwable e) { |
+ fail("Active shell has failed to load."); |
+ } |
return getActivity(); |
} |