summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authornileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 22:33:17 +0000
committernileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 22:33:17 +0000
commit70760a7406c507cdf0e45bb772bd2efac16f7a53 (patch)
tree8dac36ea8f5ebfd175bdbe873b6c9ccd09373cde /content/shell
parente4b233e2acfe57d009361f93f1b78c29259dc93a (diff)
downloadchromium_src-70760a7406c507cdf0e45bb772bd2efac16f7a53.zip
chromium_src-70760a7406c507cdf0e45bb772bd2efac16f7a53.tar.gz
chromium_src-70760a7406c507cdf0e45bb772bd2efac16f7a53.tar.bz2
Allow BrowserTestBase to do wait.
On Android, RemoteTestServer destructions waits on the caller thread. Also not setting the contentview in test activity to avoid onAttachedToWindow and onShow calls. BUG=138275 Review URL: https://chromiumcodereview.appspot.com/12188016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/android/browsertests_apk/res/layout/test_activity.xml6
-rw-r--r--content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java8
2 files changed, 10 insertions, 4 deletions
diff --git a/content/shell/android/browsertests_apk/res/layout/test_activity.xml b/content/shell/android/browsertests_apk/res/layout/test_activity.xml
index c62e66e..fbcb803 100644
--- a/content/shell/android/browsertests_apk/res/layout/test_activity.xml
+++ b/content/shell/android/browsertests_apk/res/layout/test_activity.xml
@@ -6,9 +6,11 @@
found in the LICENSE file.
-->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:orientation="vertical">
<org.chromium.content_shell.ShellManager
android:id="@+id/shell_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
-</merge>
+</LinearLayout>
diff --git a/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java b/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java
index 3d07e84..86992a5 100644
--- a/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java
+++ b/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java
@@ -7,6 +7,8 @@ package org.chromium.content_browsertests_apk;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
import android.util.Log;
import org.chromium.content.app.LibraryLoader;
@@ -32,8 +34,10 @@ public class ContentBrowserTestsActivity extends Activity {
}
AndroidBrowserProcess.initChromiumBrowserProcessForTests();
- setContentView(R.layout.test_activity);
- mShellManager = (ShellManager) findViewById(R.id.shell_container);
+ LayoutInflater inflater =
+ (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ View view = inflater.inflate(R.layout.test_activity, null);
+ mShellManager = (ShellManager) view.findViewById(R.id.shell_container);
mActivityNativeWindow = new ActivityNativeWindow(this);
mShellManager.setWindow(mActivityNativeWindow);