• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 package org.chromium.webview_shell;
6 
7 import android.app.Activity;
8 import android.os.Bundle;
9 import android.os.SystemClock;
10 import android.webkit.WebView;
11 
12 /**
13  * This activity is designed for startup time testing of the WebView.
14  */
15 public class StartupTimeActivity extends Activity {
16 
17     @Override
onCreate(Bundle savedInstanceState)18     public void onCreate(Bundle savedInstanceState) {
19         super.onCreate(savedInstanceState);
20         getWindow().setTitle(
21                 getResources().getString(R.string.title_activity_startup_time));
22 
23         long t1 = SystemClock.elapsedRealtime();
24         WebView webView = new WebView(this);
25         setContentView(webView);
26         long t2 = SystemClock.elapsedRealtime();
27         android.util.Log.i("WebViewShell", "WebViewStartupTimeMillis=" + (t2 - t1));
28     }
29 
30 }
31 
32