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

Unified Diff: chrome/browser/extensions/app_process_apitest.cc

Issue 8393026: Fix flakiness in NewTab() calls of AppApiTest browser_test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/browser/extensions/app_process_apitest.cc
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 4382c4db875ef20b9b47e6b51d5e71957d2c5b5f..3e978412c6133c177d644c5b35d6ea98871a8e5d 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -78,15 +78,7 @@ static void NavigateTabHelper(TabContents* contents, const GURL& url) {
EXPECT_EQ(url, contents->controller().GetLastCommittedEntry()->url());
}
-#if defined(OS_WIN)
-// AppProcess sometimes hangs on Windows
-// http://crbug.com/88316
-#define MAYBE_AppProcess DISABLED_AppProcess
-#else
-#define MAYBE_AppProcess AppProcess
-#endif
-
-IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcess) {
+IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePopupBlocking);
@@ -110,12 +102,19 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcess) {
EXPECT_TRUE(extension_process_manager->IsExtensionProcess(
browser()->GetTabContentsAt(1)->render_view_host()->process()->id()));
EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui());
- browser()->NewTab();
- ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path2/empty.html"));
+
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(), base_url.Resolve("path2/empty.html"), NEW_FOREGROUND_TAB,
+ ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
EXPECT_TRUE(extension_process_manager->IsExtensionProcess(
browser()->GetTabContentsAt(2)->render_view_host()->process()->id()));
EXPECT_FALSE(browser()->GetTabContentsAt(2)->web_ui());
+
+ ui_test_utils::WindowedNotificationObserver tab_added_observer(
+ content::NOTIFICATION_TAB_ADDED,
+ content::NotificationService::AllSources());
browser()->NewTab();
+ tab_added_observer.Wait();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path3/empty.html"));
EXPECT_FALSE(extension_process_manager->IsExtensionProcess(
browser()->GetTabContentsAt(3)->render_view_host()->process()->id()));
@@ -173,17 +172,9 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcess) {
ASSERT_TRUE(windowOpenerValid);
}
-
-#if defined(OS_WIN)
-// Seems to timeout sometimes on Windows: http://crbug.com/89766
-#define MAYBE_AppProcessInstances FLAKY_AppProcessInstances
-#else
-#define MAYBE_AppProcessInstances AppProcessInstances
-#endif
-
// Test that hosted apps without the background permission use a process per app
// instance model, such that separate instances are in separate processes.
-IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessInstances) {
+IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcessInstances) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePopupBlocking);
@@ -208,7 +199,12 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessInstances) {
EXPECT_TRUE(extension_process_manager->IsExtensionProcess(
browser()->GetTabContentsAt(1)->render_view_host()->process()->id()));
EXPECT_FALSE(browser()->GetTabContentsAt(1)->web_ui());
+
+ ui_test_utils::WindowedNotificationObserver tab_added_observer(
+ content::NOTIFICATION_TAB_ADDED,
+ content::NotificationService::AllSources());
browser()->NewTab();
+ tab_added_observer.Wait();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path2/empty.html"));
EXPECT_TRUE(extension_process_manager->IsExtensionProcess(
browser()->GetTabContentsAt(2)->render_view_host()->process()->id()));
« 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