| Index: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java
|
| index 20ba857cd1f70eb646d830a32b857b8d4419bda8..5553294dc899601033fc40ffcfd3b53cdc577385 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java
|
| @@ -9,44 +9,32 @@ import android.content.ComponentName;
|
| import android.content.Context;
|
| import android.content.Intent;
|
| import android.net.Uri;
|
| -import android.os.Bundle;
|
| -import android.os.IBinder;
|
| import android.os.Process;
|
| import android.support.customtabs.CustomTabsIntent;
|
| -import android.support.customtabs.ICustomTabsCallback;
|
| +import android.support.customtabs.CustomTabsSession;
|
|
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.chrome.browser.document.ChromeLauncherActivity;
|
| -import org.chromium.chrome.browser.util.IntentUtils;
|
|
|
| /**
|
| * Utility class that contains convenience calls related with custom tabs testing.
|
| */
|
| public class CustomTabsTestUtils {
|
| - /** Dummy callback, doing nothing. */
|
| - public static class DummyCallback extends ICustomTabsCallback.Stub {
|
| - @Override
|
| - public void onNavigationEvent(int navigationEvent, Bundle extras) {}
|
| -
|
| - @Override
|
| - public void extraCallback(String callbackName, Bundle args) {}
|
| -
|
| - @Override
|
| - public IBinder asBinder() {
|
| - return this;
|
| - }
|
| - }
|
|
|
| /**
|
| * Creates the simplest intent that is sufficient to let {@link ChromeLauncherActivity} launch
|
| * the {@link CustomTabActivity}.
|
| */
|
| public static Intent createMinimalCustomTabIntent(
|
| - Context context, String url, IBinder session) {
|
| - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
| + Context context, String url) {
|
| + CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(
|
| + CustomTabsSession.createDummySessionForTesting(
|
| + new ComponentName(context, ChromeLauncherActivity.class)));
|
| + CustomTabsIntent customTabsIntent = builder.build();
|
| + Intent intent = customTabsIntent.intent;
|
| + intent.setAction(Intent.ACTION_VIEW);
|
| + intent.setData(Uri.parse(url));
|
| intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
| - intent.setComponent(new ComponentName(context, ChromeLauncherActivity.class));
|
| - IntentUtils.safePutBinderExtra(intent, CustomTabsIntent.EXTRA_SESSION, session);
|
| return intent;
|
| }
|
|
|
|
|