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

Unified Diff: chrome/browser/task_manager/task_manager_browsertest.cc

Issue 8221018: WebUI TaskManager: Turn it on-by-default on Win/Mac/Linux (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/task_manager_browsertest.cc
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc
index fa9369ae71c00d60ce2d4b158f2191aa8990bbfa..26e0e6845f1d4598ce8d18084c994f38c111bf18 100644
--- a/chrome/browser/task_manager/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -207,6 +207,8 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeExtensionTabs) {
// Show the task manager. This populates the model, and helps with debugging
// (you see the task manager).
browser()->window()->ShowTaskManager();
+ // Wait for loading of task manager.
+ TaskManagerBrowserTestUtil::WaitForResourceChange(2);
ASSERT_TRUE(LoadExtension(
test_data_dir_.AppendASCII("good").AppendASCII("Extensions")
@@ -246,6 +248,8 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeAppTabs) {
// Show the task manager. This populates the model, and helps with debugging
// (you see the task manager).
browser()->window()->ShowTaskManager();
+ // Wait for loading of task manager.
+ TaskManagerBrowserTestUtil::WaitForResourceChange(2);
ASSERT_TRUE(LoadExtension(
test_data_dir_.AppendASCII("packaged_app")));
@@ -330,12 +334,16 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_KillExtension) {
// Show the task manager. This populates the model, and helps with debugging
// (you see the task manager).
browser()->window()->ShowTaskManager();
+ // Wait for loading of task manager.
+ TaskManagerBrowserTestUtil::WaitForResourceChange(2);
+ LOG(INFO) << "loading extension";
mazda 2011/10/10 23:58:46 Are these LOG(INFO) added intentionally? If not, p
yoshiki 2011/10/11 00:09:09 Done.
ASSERT_TRUE(LoadExtension(
test_data_dir_.AppendASCII("common").AppendASCII("background_page")));
// Wait until we see the loaded extension in the task manager (the three
// resources are: the browser process, New Tab Page, and the extension).
+ LOG(INFO) << "waiting for resource change";
TaskManagerBrowserTestUtil::WaitForResourceChange(3);
EXPECT_EQ(1, TaskManager::GetBackgroundPageCount());
@@ -344,7 +352,9 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_KillExtension) {
ASSERT_TRUE(model()->GetResourceExtension(2) != NULL);
// Kill the extension process and make sure we notice it.
+ LOG(INFO) << "killing extension";
TaskManager::GetInstance()->KillProcess(2);
+ LOG(INFO) << "waiting for resource change";
TaskManagerBrowserTestUtil::WaitForResourceChange(2);
EXPECT_EQ(0, TaskManager::GetBackgroundPageCount());
}
@@ -355,6 +365,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest,
// Show the task manager. This populates the model, and helps with debugging
// (you see the task manager).
browser()->window()->ShowTaskManager();
+ TaskManagerBrowserTestUtil::WaitForResourceChange(2);
ASSERT_TRUE(LoadExtension(
test_data_dir_.AppendASCII("common").AppendASCII("background_page")));
@@ -396,6 +407,8 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, MAYBE_ReloadExtension) {
// Show the task manager. This populates the model, and helps with debugging
// (you see the task manager).
browser()->window()->ShowTaskManager();
+ // Wait for loading of task manager.
+ TaskManagerBrowserTestUtil::WaitForResourceChange(2);
LOG(INFO) << "loading extension";
ASSERT_TRUE(LoadExtension(
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698