EMMA Coverage Report (generated Fri Aug 23 16:39:17 PDT 2013)
[all classes][org.chromium.content.browser.test.util]

COVERAGE SUMMARY FOR SOURCE FILE [TestContentViewClient.java]

nameclass, %method, %block, %line, %
TestContentViewClient.java100% (1/1)100% (4/4)100% (24/24)100% (8/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TestContentViewClient100% (1/1)100% (4/4)100% (24/24)100% (8/8)
TestContentViewClient (): void 100% (1/1)100% (13/13)100% (4/4)
getOnEvaluateJavaScriptResultHelper (): TestCallbackHelperContainer$OnEvaluat... 100% (1/1)100% (3/3)100% (1/1)
getOnStartContentIntentHelper (): TestCallbackHelperContainer$OnStartContentI... 100% (1/1)100% (3/3)100% (1/1)
onStartContentIntent (Context, String): void 100% (1/1)100% (5/5)100% (2/2)

1// Copyright (c) 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.
4 
5package org.chromium.content.browser.test.util;
6 
7import android.content.Context;
8 
9import org.chromium.content.browser.ContentViewClient;
10import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnEvaluateJavaScriptResultHelper;
11import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnStartContentIntentHelper;
12 
13/**
14 * The default ContentViewClient used by ContentView tests.
15 * <p>
16 * Tests that need to supply their own ContentViewClient should do that
17 * by extending this one.
18 */
19public class TestContentViewClient extends ContentViewClient {
20 
21    private OnEvaluateJavaScriptResultHelper mOnEvaluateJavaScriptResultHelper;
22    private OnStartContentIntentHelper mOnStartContentIntentHelper;
23 
24    public TestContentViewClient() {
25        mOnEvaluateJavaScriptResultHelper = new OnEvaluateJavaScriptResultHelper();
26        mOnStartContentIntentHelper = new OnStartContentIntentHelper();
27    }
28 
29    public OnEvaluateJavaScriptResultHelper getOnEvaluateJavaScriptResultHelper() {
30        return mOnEvaluateJavaScriptResultHelper;
31    }
32 
33    public OnStartContentIntentHelper getOnStartContentIntentHelper() {
34        return mOnStartContentIntentHelper;
35    }
36 
37    /**
38     * ATTENTION!: When overriding the following method, be sure to call
39     * the corresponding method in the super class. Otherwise
40     * {@link CallbackHelper#waitForCallback()} methods will
41     * stop working!
42     */
43 
44    @Override
45    public void onStartContentIntent(Context context, String contentUrl) {
46        mOnStartContentIntentHelper.notifyCalled(contentUrl);
47    }
48}

[all classes][org.chromium.content.browser.test.util]
EMMA 2.0.5312 (C) Vladimir Roubtsov