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

Side by Side Diff: chrome/browser/task_manager/task_manager_browsertest_util.cc

Issue 12712018: Fixing problem with incomplete browser windows showing up after task manager was used (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed again. Done. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/task_manager/task_manager.h" 10 #include "chrome/browser/task_manager/task_manager.h"
11 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" 11 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_dialogs.h"
13 #include "chrome/browser/ui/browser_window.h" 14 #include "chrome/browser/ui/browser_window.h"
14 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
15 #include "chrome/test/base/ui_test_utils.h" 16 #include "chrome/test/base/ui_test_utils.h"
16 #include "content/public/browser/notification_source.h" 17 #include "content/public/browser/notification_source.h"
17 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
18 19
19 namespace { 20 namespace {
20 21
21 int GetWebResourceCount(const TaskManagerModel* model) { 22 int GetWebResourceCount(const TaskManagerModel* model) {
22 int count = 0; 23 int count = 0;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // This check has to be placed after the installation of the observer, 86 // This check has to be placed after the installation of the observer,
86 // because resources may change before that. 87 // because resources may change before that.
87 if (GetWebResourceCount(model) == target_count) { 88 if (GetWebResourceCount(model) == target_count) {
88 model->RemoveObserver(&observer); 89 model->RemoveObserver(&observer);
89 return; 90 return;
90 } 91 }
91 92
92 content::RunMessageLoop(); 93 content::RunMessageLoop();
93 model->RemoveObserver(&observer); 94 model->RemoveObserver(&observer);
94 } 95 }
95
96 // static
97 void TaskManagerBrowserTestUtil::ShowTaskManagerAndWaitForReady(
98 Browser* browser) {
99 browser->window()->ShowTaskManager();
100 }
101
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698