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

Unified Diff: content/simple_content_shell_test.sh

Issue 10689168: Run simple content shell test on Android bots. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add simple content shell test script. Created 8 years, 5 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
« no previous file with comments | « build/android/buildbot_try_tester.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/simple_content_shell_test.sh
diff --git a/content/simple_content_shell_test.sh b/content/simple_content_shell_test.sh
new file mode 100755
index 0000000000000000000000000000000000000000..13c234985787ffb34a54d6006a87968d54e715cd
--- /dev/null
+++ b/content/simple_content_shell_test.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
jam 2012/07/13 15:11:29 nit: put this in content/shell/android?
+
+# Copyright (c) 2012 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.
+
+# Simple test launches a content shell to load a URL, and waits 5 seconds before
+# checking there are two content shell processes (grep ps for 'content_shell').
+# The script expects your environment to be set up for chrome on android.
+
+if [ $# -ne 1 ]; then
+ echo "Error: Please specify content shell location"
+ exit 1
+fi
+
+CONTENT_SHELL_APK=$1
+
+# Reinstall content shell. This will also kill existing content_shell procs.
+adb uninstall org.chromium.content_shell
+
+if [ ! -f ${CONTENT_SHELL_APK} ]; then
John Grabowski 2012/07/12 18:40:14 If no args are passed to this script, [ ! -f ${CON
navabi 2012/07/13 20:05:38 Done.
+ echo "Error: Could not find specified content shell apk to install."
+ exit 1
+fi
+adb install -r ${CONTENT_SHELL_APK}
+
+# Launch a content shell process to open about:version
+adb shell am start -n org.chromium.content_shell/.ContentShellActivity -d \
+ "about:version"
+
+# Wait 5 seconds, to give the content shell some time to crash.
+sleep 5
+
+# Get the number of content shell procs that exist.
+NUM_PROCS=`adb shell ps | grep content_shell | wc | awk '{print $1}'`
+
+# Check that there are two content shell processes (browser and renderer).
+if [[ "${NUM_PROCS}" -lt 2 ]]; then
+ echo "ERROR: Expected two content shell processes (browser and renderer)."
+ echo " Found ${NUM_PROCS} 'content_shell' process(es)."
+ # Uninstall content shell to clean up.
+ adb uninstall org.chromium.content_shell
+ exit -1
+fi
+
+# Uninstall content shell to clean up.
+adb uninstall org.chromium.content_shell
« no previous file with comments | « build/android/buildbot_try_tester.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698