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
3 // found in the LICENSE file.
5 package org.chromium.content.browser.test.util;
7 import android.content.Context;
9 import org.chromium.content.browser.ContentViewClient;
10 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnStartContentIntentHelper;
13 * The default ContentViewClient used by ContentView tests.
15 * Tests that need to supply their own ContentViewClient should do that
16 * by extending this one.
18 public class TestContentViewClient extends ContentViewClient {
20 private final OnStartContentIntentHelper mOnStartContentIntentHelper;
22 public TestContentViewClient() {
23 mOnStartContentIntentHelper = new OnStartContentIntentHelper();
26 public OnStartContentIntentHelper getOnStartContentIntentHelper() {
27 return mOnStartContentIntentHelper;
31 * ATTENTION!: When overriding the following method, be sure to call
32 * the corresponding method in the super class. Otherwise
33 * {@link CallbackHelper#waitForCallback()} methods will
38 public void onStartContentIntent(Context context, String contentUrl) {
39 mOnStartContentIntentHelper.notifyCalled(contentUrl);