EMMA Coverage Report (generated Tue Aug 20 10:07:21 PDT 2013)
[all classes][org.chromium.android_webview.test]

COVERAGE SUMMARY FOR SOURCE FILE [NullContentsClient.java]

nameclass, %method, %block, %line, %
NullContentsClient.java100% (1/1)32%  (12/37)33%  (18/54)30%  (12/40)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NullContentsClient100% (1/1)32%  (12/37)33%  (18/54)30%  (12/40)
getVideoLoadingProgressView (): View 0%   (0/1)0%   (0/2)0%   (0/1)
handleJsAlert (String, String, JsResultReceiver): void 0%   (0/1)0%   (0/1)0%   (0/1)
handleJsBeforeUnload (String, String, JsResultReceiver): void 0%   (0/1)0%   (0/1)0%   (0/1)
handleJsConfirm (String, String, JsResultReceiver): void 0%   (0/1)0%   (0/1)0%   (0/1)
handleJsPrompt (String, String, String, JsPromptResultReceiver): void 0%   (0/1)0%   (0/1)0%   (0/1)
onCloseWindow (): void 0%   (0/1)0%   (0/1)0%   (0/1)
onConsoleMessage (ConsoleMessage): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
onCreateWindow (boolean, boolean): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
onDownloadStart (String, String, String, String, long): void 0%   (0/1)0%   (0/1)0%   (0/1)
onFindResultReceived (int, int, boolean): void 0%   (0/1)0%   (0/1)0%   (0/1)
onFormResubmission (Message, Message): void 0%   (0/1)0%   (0/3)0%   (0/2)
onGeolocationPermissionsHidePrompt (): void 0%   (0/1)0%   (0/1)0%   (0/1)
onGeolocationPermissionsShowPrompt (String, GeolocationPermissions$Callback):... 0%   (0/1)0%   (0/1)0%   (0/1)
onHideCustomView (): void 0%   (0/1)0%   (0/1)0%   (0/1)
onNewPicture (Picture): void 0%   (0/1)0%   (0/1)0%   (0/1)
onPageFinished (String): void 0%   (0/1)0%   (0/1)0%   (0/1)
onPageStarted (String): void 0%   (0/1)0%   (0/1)0%   (0/1)
onReceivedError (int, String, String): void 0%   (0/1)0%   (0/1)0%   (0/1)
onReceivedHttpAuthRequest (AwHttpAuthHandler, String, String): void 0%   (0/1)0%   (0/3)0%   (0/2)
onReceivedLoginRequest (String, String, String): void 0%   (0/1)0%   (0/1)0%   (0/1)
onReceivedSslError (ValueCallback, SslError): void 0%   (0/1)0%   (0/5)0%   (0/2)
onReceivedTitle (String): void 0%   (0/1)0%   (0/1)0%   (0/1)
onReceivedTouchIconUrl (String, boolean): void 0%   (0/1)0%   (0/1)0%   (0/1)
onScaleChangedScaled (float, float): void 0%   (0/1)0%   (0/1)0%   (0/1)
onShowCustomView (View, WebChromeClient$CustomViewCallback): void 0%   (0/1)0%   (0/1)0%   (0/1)
NullContentsClient (): void 100% (1/1)100% (3/3)100% (1/1)
doUpdateVisitedHistory (String, boolean): void 100% (1/1)100% (1/1)100% (1/1)
getDefaultVideoPoster (): Bitmap 100% (1/1)100% (2/2)100% (1/1)
getVisitedHistory (ValueCallback): void 100% (1/1)100% (1/1)100% (1/1)
onLoadResource (String): void 100% (1/1)100% (1/1)100% (1/1)
onProgressChanged (int): void 100% (1/1)100% (1/1)100% (1/1)
onReceivedIcon (Bitmap): void 100% (1/1)100% (1/1)100% (1/1)
onRequestFocus (): void 100% (1/1)100% (1/1)100% (1/1)
onUnhandledKeyEvent (KeyEvent): void 100% (1/1)100% (1/1)100% (1/1)
shouldInterceptRequest (String): InterceptedRequestData 100% (1/1)100% (2/2)100% (1/1)
shouldOverrideKeyEvent (KeyEvent): boolean 100% (1/1)100% (2/2)100% (1/1)
shouldOverrideUrlLoading (String): boolean 100% (1/1)100% (2/2)100% (1/1)

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.android_webview.test;
6 
7import android.graphics.Bitmap;
8import android.graphics.Picture;
9import android.net.http.SslError;
10import android.os.Message;
11import android.view.KeyEvent;
12import android.view.View;
13import android.webkit.ConsoleMessage;
14import android.webkit.GeolocationPermissions;
15import android.webkit.ValueCallback;
16import android.webkit.WebChromeClient;
17 
18import org.chromium.android_webview.AwContentsClient;
19import org.chromium.android_webview.AwHttpAuthHandler;
20import org.chromium.android_webview.InterceptedRequestData;
21import org.chromium.android_webview.JsPromptResultReceiver;
22import org.chromium.android_webview.JsResultReceiver;
23 
24/**
25 * As a convience for tests that only care about specefic callbacks, this class provides
26 * empty implementations of all abstract methods.
27 */
28public class NullContentsClient extends AwContentsClient {
29    @Override
30    public boolean shouldOverrideUrlLoading(String url) {
31        return false;
32    }
33 
34    @Override
35    public void onUnhandledKeyEvent(KeyEvent event) {
36    }
37 
38    @Override
39    public void getVisitedHistory(ValueCallback<String[]> callback) {
40    }
41 
42    @Override
43    public void doUpdateVisitedHistory(String url, boolean isReload) {
44    }
45 
46    @Override
47    public void onProgressChanged(int progress) {
48    }
49 
50    @Override
51    public InterceptedRequestData shouldInterceptRequest(String url) {
52        return null;
53    }
54 
55    @Override
56    public boolean shouldOverrideKeyEvent(KeyEvent event) {
57        return false;
58    }
59 
60    @Override
61    public void onLoadResource(String url) {
62    }
63 
64    @Override
65    public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
66        return false;
67    }
68 
69    @Override
70    public void onReceivedHttpAuthRequest(AwHttpAuthHandler handler, String host, String realm) {
71        handler.cancel();
72    }
73 
74    @Override
75    public void onReceivedSslError(ValueCallback<Boolean> callback, SslError error) {
76        callback.onReceiveValue(false);
77    }
78 
79    @Override
80    public void onReceivedLoginRequest(String realm, String account, String args) {
81    }
82 
83    @Override
84    public void onGeolocationPermissionsShowPrompt(String origin,
85            GeolocationPermissions.Callback callback) {
86    }
87 
88    @Override
89    public void onGeolocationPermissionsHidePrompt() {
90    }
91 
92    @Override
93    public void handleJsAlert(String url, String message, JsResultReceiver receiver) {
94    }
95 
96    @Override
97    public void handleJsBeforeUnload(String url, String message, JsResultReceiver receiver) {
98    }
99 
100    @Override
101    public void handleJsConfirm(String url, String message, JsResultReceiver receiver) {
102    }
103 
104    @Override
105    public void handleJsPrompt(
106            String url, String message, String defaultValue, JsPromptResultReceiver receiver) {
107    }
108 
109    @Override
110    public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches,
111            boolean isDoneCounting) {
112    }
113 
114    @Override
115    public void onNewPicture(Picture picture) {
116    }
117 
118    @Override
119    public void onPageStarted(String url) {
120    }
121 
122    @Override
123    public void onPageFinished(String url) {
124    }
125 
126    @Override
127    public void onReceivedError(int errorCode, String description, String failingUrl) {
128    }
129 
130    @Override
131    public void onFormResubmission(Message dontResend, Message resend) {
132        dontResend.sendToTarget();
133    }
134 
135    @Override
136    public void onDownloadStart(String url,
137                                String userAgent,
138                                String contentDisposition,
139                                String mimeType,
140                                long contentLength) {
141    }
142 
143    @Override
144    public boolean onCreateWindow(boolean isDialog, boolean isUserGesture) {
145        return false;
146    }
147 
148    @Override
149    public void onCloseWindow() {
150    }
151 
152    @Override
153    public void onRequestFocus() {
154    }
155 
156    @Override
157    public void onReceivedTouchIconUrl(String url, boolean precomposed) {
158    }
159 
160    @Override
161    public void onReceivedIcon(Bitmap bitmap) {
162    }
163 
164    @Override
165    public void onReceivedTitle(String title) {
166    }
167 
168    @Override
169    public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
170    }
171 
172    @Override
173    public void onHideCustomView() {
174    }
175 
176    @Override
177    public void onScaleChangedScaled(float oldScale, float newScale) {
178    }
179 
180    @Override
181    protected View getVideoLoadingProgressView() {
182        return null;
183    }
184 
185    @Override
186    public Bitmap getDefaultVideoPoster() {
187        return null;
188    }
189}

[all classes][org.chromium.android_webview.test]
EMMA 2.0.5312 (C) Vladimir Roubtsov