Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2450)

Unified Diff: android_webview/tools/WebViewShell/src/org/chromium/webview_shell/StartupTimeActivity.java

Issue 1070563005: [Android WebView] Upstream WebViewShell to chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix copyright year Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/tools/WebViewShell/src/org/chromium/webview_shell/StartupTimeActivity.java
diff --git a/android_webview/tools/WebViewShell/src/org/chromium/webview_shell/StartupTimeActivity.java b/android_webview/tools/WebViewShell/src/org/chromium/webview_shell/StartupTimeActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..e5c46051c07e5f727dc3dd117084aeb5bdd87266
--- /dev/null
+++ b/android_webview/tools/WebViewShell/src/org/chromium/webview_shell/StartupTimeActivity.java
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.webview_shell;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.os.SystemClock;
+import android.webkit.WebView;
+
+/**
+ * This activity is designed for startup time testing of the WebView.
+ */
+public class StartupTimeActivity extends Activity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ getWindow().setTitle(
+ getResources().getString(R.string.title_activity_startup_time));
+
+ long t1 = SystemClock.elapsedRealtime();
+ WebView webView = new WebView(this);
+ setContentView(webView);
+ long t2 = SystemClock.elapsedRealtime();
+ android.util.Log.i("WebViewShell", "WebViewStartupTimeMillis=" + (t2 - t1));
+ }
+
+}
+

Powered by Google App Engine
This is Rietveld 408576698