diff options
author | Tim Volodine <timvolodine@google.com> | 2015-04-20 17:21:13 +0100 |
---|---|---|
committer | Tim Volodine <timvolodine@google.com> | 2015-04-20 17:21:13 +0100 |
commit | b2a12d96ed8a6b493dcdcb7b685a166207904df8 (patch) | |
tree | 9cd04a704b433168169671a8ab935f0cb7eabcdc | |
parent | c2aae77521ed9db7157053968fe1070b8cac2d6a (diff) | |
download | webview-b2a12d96ed8a6b493dcdcb7b685a166207904df8.tar.gz |
[Android WebView] Delete WebViewShell.
WebViewShell now lives in the chromium repository, so this patch
removes it from the android checkout (see crbug.com/475084).
Change-Id: I88dfc95eeb4597d38e936d2b13f801bbf5509fbb
10 files changed, 0 insertions, 372 deletions
diff --git a/chromium/tools/WebViewShell/Android.mk b/chromium/tools/WebViewShell/Android.mk deleted file mode 100644 index 26912b1..0000000 --- a/chromium/tools/WebViewShell/Android.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (C) 2013 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(call all-subdir-java-files) - -LOCAL_PACKAGE_NAME := WebViewShell - -LOCAL_SDK_VERSION := 17 - -include $(BUILD_PACKAGE) diff --git a/chromium/tools/WebViewShell/AndroidManifest.xml b/chromium/tools/WebViewShell/AndroidManifest.xml deleted file mode 100644 index 9f03b6c..0000000 --- a/chromium/tools/WebViewShell/AndroidManifest.xml +++ /dev/null @@ -1,62 +0,0 @@ -<!-- - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - --> - -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.android.webview.chromium.shell" - android:versionCode="1" - android:versionName="1.0" > - - <uses-sdk android:minSdkVersion="17" - android:targetSdkVersion="22" /> - - <uses-permission android:name="android.permission.INTERNET" /> - <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> - - <application - android:icon="@drawable/ic_launcher" - android:label="@string/app_name" - android:theme="@android:style/Theme.Light" > - <activity - android:name=".TelemetryActivity" - android:label="@string/title_activity_telemetry" - android:exported="true"> - </activity> - <activity - android:name=".JankActivity" - android:label="@string/title_activity_jank" - android:noHistory="true" - android:exported="true"> - </activity> - <activity - android:name=".StartupTimeActivity" - android:label="@string/title_activity_startup_time" - android:noHistory="true" - android:exported="true"> - </activity> - <activity - android:name=".WebViewBrowserActivity" - android:label="@string/title_activity_browser" - android:exported="true"> - <intent-filter> - <action android:name="android.intent.action.VIEW" /> - <category android:name="android.intent.category.DEFAULT" /> - <category android:name="android.intent.category.BROWSABLE" /> - <data android:scheme="http" /> - <data android:scheme="https" /> - </intent-filter> - </activity> - </application> -</manifest> diff --git a/chromium/tools/WebViewShell/res/drawable/ic_launcher.png b/chromium/tools/WebViewShell/res/drawable/ic_launcher.png Binary files differdeleted file mode 100644 index 96a442e..0000000 --- a/chromium/tools/WebViewShell/res/drawable/ic_launcher.png +++ /dev/null diff --git a/chromium/tools/WebViewShell/res/layout/activity_telemetry.xml b/chromium/tools/WebViewShell/res/layout/activity_telemetry.xml deleted file mode 100644 index 2ef8394..0000000 --- a/chromium/tools/WebViewShell/res/layout/activity_telemetry.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/container" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:gravity="center"> - - <WebView - android:id="@+id/webview" - android:layout_width="match_parent" - android:layout_height="match_parent" /> -</LinearLayout> - diff --git a/chromium/tools/WebViewShell/res/values/strings.xml b/chromium/tools/WebViewShell/res/values/strings.xml deleted file mode 100644 index 00085bf..0000000 --- a/chromium/tools/WebViewShell/res/values/strings.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<resources> - <string name="app_name">WebView Telemetry</string> - <string name="title_activity_telemetry">WebView Telemetry</string> - <string name="title_activity_jank">WebView Jank Tester</string> - <string name="title_activity_startup_time">WebView Startup Time Tester</string> - <string name="title_activity_browser">WebView Browser Tester</string> -</resources> diff --git a/chromium/tools/WebViewShell/run_startup_time_test.sh b/chromium/tools/WebViewShell/run_startup_time_test.sh deleted file mode 100644 index 7ddf83a..0000000 --- a/chromium/tools/WebViewShell/run_startup_time_test.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -if ! which adb &> /dev/null; then - echo "adb is not in your path, did you run envsetup.sh?" - exit -1 -fi - -TMPFILE=$(tempfile) -echo '<body><div>just some text</div></body>' > $TMPFILE -adb push $TMPFILE /data/local/tmp/file.html -rm $TMPFILE -adb shell am start -n com.android.htmlviewer/.HTMLViewerActivity -d "file:///data/local/tmp/file.html" -a VIEW -t "text/html" - -sleep 3 - -echo 'Running test, you should run `adb logcat | grep WebViewStartupTimeMillis=` in another shell to see results.' -# Launch webview test shell 100 times -for i in $(seq 1 100); do - if [[ $(($i % 10)) -eq 0 ]]; then - echo -n "..$i.." - fi - adb shell kill -9 `adb shell ps | grep com.android.webview.chromium.shell | tr -s " " " " | cut -d" " -f2` - adb shell am start -n com.android.webview.chromium.shell/.StartupTimeActivity -a VIEW > /dev/null - sleep 0.5 -done -echo - -adb shell rm /data/local/tmp/file.html diff --git a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/JankActivity.java b/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/JankActivity.java deleted file mode 100644 index 3694ce9..0000000 --- a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/JankActivity.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.webview.chromium.shell; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.webkit.CookieManager; -import android.webkit.WebView; -import android.webkit.WebViewClient; - -/** - * This activity is designed for Android Jank testing of WebView. It takes a URL as an argument, and - * displays the page ready for the Jank tester to test scrolling etc. - */ -public class JankActivity extends Activity { - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWindow().setTitle( - getResources().getString(R.string.title_activity_jank)); - setContentView(R.layout.activity_telemetry); - - WebView webView = (WebView) findViewById(R.id.webview); - CookieManager.setAcceptFileSchemeCookies(true); - - webView.setWebViewClient(new WebViewClient() { - @Override - public boolean shouldOverrideUrlLoading(WebView webView, String url) { - return false; - } - }); - - String url = getUrlFromIntent(getIntent()); - webView.loadUrl(url); - } - - private static String getUrlFromIntent(Intent intent) { - return intent != null ? intent.getDataString() : null; - } - -} diff --git a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/StartupTimeActivity.java b/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/StartupTimeActivity.java deleted file mode 100644 index aa805e6..0000000 --- a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/StartupTimeActivity.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.webview.chromium.shell; - -import android.app.Activity; -import android.content.Intent; -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)); - } - -} - diff --git a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/TelemetryActivity.java b/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/TelemetryActivity.java deleted file mode 100644 index d6203d0..0000000 --- a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/TelemetryActivity.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.webview.chromium.shell; - -import android.app.Activity; -import android.os.Bundle; -import android.webkit.CookieManager; -import android.webkit.WebView; -import android.webkit.WebViewClient; - -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"); - } -} diff --git a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/WebViewBrowserActivity.java b/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/WebViewBrowserActivity.java deleted file mode 100644 index f1dfcf4..0000000 --- a/chromium/tools/WebViewShell/src/com/android/webview/chromium/shell/WebViewBrowserActivity.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.webview.chromium.shell; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.webkit.CookieManager; -import android.webkit.WebView; -import android.webkit.WebViewClient; - -/** - * This activity is designed for URL browsing testing of WebView. It takes a URL as an argument, and - * displays the page. - */ -public class WebViewBrowserActivity extends Activity { - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWindow().setTitle( - getResources().getString(R.string.title_activity_browser)); - setContentView(R.layout.activity_telemetry); - WebView webView = (WebView) findViewById(R.id.webview); - - webView.setWebViewClient(new WebViewClient() { - @Override - public boolean shouldOverrideUrlLoading(WebView webView, String url) { - return false; - } - }); - - String url = getUrlFromIntent(getIntent()); - webView.loadUrl(url); - } - - private static String getUrlFromIntent(Intent intent) { - return intent != null ? intent.getDataString() : null; - } - -} |