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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java

Issue 2759663003: Fixed process binding tests (Closed)
Patch Set: Without PlzNavigate Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
index cb216b20ca7d1bb9d4159c04f1e65f1af779bdff..f11d6b4a262cfbcac55a28000eaf582c838657c9 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
@@ -158,6 +158,8 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
private static final String ABOUT_VERSION_PATH = "chrome://version/";
private static final String SHARED_RENDERER_PAGE_PATH =
"/chrome/test/data/android/bindingmanager/shared_renderer1.html";
+ private static final String SHARED_RENDERER_PAGE2_PATH =
+ "/chrome/test/data/android/bindingmanager/shared_renderer2.html";
public BindingManagerIntegrationTest() {
super(ChromeActivity.class);
@@ -348,17 +350,17 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
@Feature({"ProcessManagement"})
public void testCrashInForeground() throws InterruptedException {
// Create a tab in foreground and wait until it is loaded.
+ final String testUrl = mTestServer.getURL(FILE_PATH);
final Tab tab = ThreadUtils.runOnUiThreadBlockingNoException(
new Callable<Tab>() {
@Override
public Tab call() throws Exception {
TabCreator tabCreator = getActivity().getCurrentTabCreator();
return tabCreator.createNewTab(
- new LoadUrlParams(mTestServer.getURL(FILE_PATH)),
- TabLaunchType.FROM_CHROME_UI, null);
+ new LoadUrlParams(testUrl), TabLaunchType.FROM_CHROME_UI, null);
}
});
- ChromeTabUtils.waitForTabPageLoaded(tab, mTestServer.getURL(FILE_PATH));
+ ChromeTabUtils.waitForTabPageLoaded(tab, testUrl);
getInstrumentation().waitForIdleSync();
// Kill the renderer and wait for the crash to be noted by the browser process.
@@ -381,6 +383,8 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
}
});
+ ChromeTabUtils.waitForTabPageLoaded(tab, testUrl);
+
// Wait until the process is spawned and its visibility is determined.
CriteriaHelper.pollInstrumentationThread(
new Criteria("Process for the crashed tab was not respawned.") {
@@ -593,6 +597,9 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
}
});
+ ChromeTabUtils.waitForTabPageLoaded(
+ tabs[1], mTestServer.getURL(SHARED_RENDERER_PAGE2_PATH));
+
// Wait until the process is spawned and its visibility is determined.
CriteriaHelper.pollInstrumentationThread(
new Criteria("Process for the crashed tab was not respawned.") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698