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

Unified Diff: android_webview/tools/WebViewTelemetryShell/src/org/chromium/telemetry_shell/TelemetryActivity.java

Issue 443953002: Move WebViewShell from Android to Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update package name in another place. Created 6 years, 4 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/WebViewTelemetryShell/src/org/chromium/telemetry_shell/TelemetryActivity.java
diff --git a/android_webview/tools/WebViewTelemetryShell/src/org/chromium/telemetry_shell/TelemetryActivity.java b/android_webview/tools/WebViewTelemetryShell/src/org/chromium/telemetry_shell/TelemetryActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..005a27e8e2b8f2119e4d0a8fefae9e2b2319f6e5
--- /dev/null
+++ b/android_webview/tools/WebViewTelemetryShell/src/org/chromium/telemetry_shell/TelemetryActivity.java
@@ -0,0 +1,38 @@
+// Copyright 2014 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.telemetry_shell;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.webkit.CookieManager;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+
+/**
+ * This activity is designed for Telemetry testing of WebView.
+ */
+public class TelemetryActivity extends Activity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ getWindow().setTitle(
+ getResources().getString(R.string.title_activity_telemetry));
+ setContentView(R.layout.activity_telemetry);
+
+ WebView webView = (WebView) findViewById(R.id.webview);
+ CookieManager.setAcceptFileSchemeCookies(true);
+ webView.getSettings().setJavaScriptEnabled(true);
+
+ webView.setWebViewClient(new WebViewClient() {
+ @Override
+ public boolean shouldOverrideUrlLoading(WebView webView, String url) {
+ return false;
+ }
+ });
+
+ webView.loadUrl("about:blank");
+ }
+}
« no previous file with comments | « android_webview/tools/WebViewTelemetryShell/src/org/chromium/telemetry_shell/JankActivity.java ('k') | build/all.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698