Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / android_webview / tools / WebViewShell / src / org / chromium / webview_shell / TelemetryActivity.java
blob11fa10b8a3c651c54c75a9115a383a21f26ecd0b
1 // Copyright 2015 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.webview_shell;
7 import android.app.Activity;
8 import android.os.Bundle;
9 import android.webkit.CookieManager;
10 import android.webkit.WebView;
11 import android.webkit.WebViewClient;
13 /**
14 * This activity is designed for Telemetry testing of WebView.
16 public class TelemetryActivity extends Activity {
18 @Override
19 public void onCreate(Bundle savedInstanceState) {
20 super.onCreate(savedInstanceState);
21 getWindow().setTitle(
22 getResources().getString(R.string.title_activity_telemetry));
23 setContentView(R.layout.activity_webview);
25 WebView webView = (WebView) findViewById(R.id.webview);
26 CookieManager.setAcceptFileSchemeCookies(true);
27 webView.getSettings().setJavaScriptEnabled(true);
29 webView.setWebViewClient(new WebViewClient() {
30 @Override
31 public boolean shouldOverrideUrlLoading(WebView webView, String url) {
32 return false;
34 });
36 webView.loadUrl("about:blank");