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

Side by Side Diff: chrome/browser/debugger/devtools_sanity_unittest.cc

Issue 10113005: Remove EPM:all_hosts_ and use all_extension_views_ instead. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: interactive_ui_tests Created 8 years, 8 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
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/bind.h" 5 #include "base/bind.h"
6 #include "base/cancelable_callback.h" 6 #include "base/cancelable_callback.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 content::NotificationRegistrar registrar; 224 content::NotificationRegistrar registrar;
225 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, 225 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
226 content::NotificationService::AllSources()); 226 content::NotificationService::AllSources());
227 base::CancelableClosure timeout( 227 base::CancelableClosure timeout(
228 base::Bind(&TimeoutCallback, "Extension host load timed out.")); 228 base::Bind(&TimeoutCallback, "Extension host load timed out."));
229 MessageLoop::current()->PostDelayedTask( 229 MessageLoop::current()->PostDelayedTask(
230 FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(4)); 230 FROM_HERE, timeout.callback(), base::TimeDelta::FromSeconds(4));
231 231
232 ExtensionProcessManager* manager = 232 ExtensionProcessManager* manager =
233 browser()->profile()->GetExtensionProcessManager(); 233 browser()->profile()->GetExtensionProcessManager();
234 for (ExtensionProcessManager::const_iterator iter = manager->begin(); 234 ExtensionProcessManager::ContentsSet all_contents =
235 iter != manager->end();) { 235 manager->GetAllContents();
236 if ((*iter)->did_stop_loading()) 236 for (ExtensionProcessManager::ContentsSet::const_iterator iter =
237 all_contents.begin();
238 iter != all_contents.end();) {
239 if (!(*iter)->IsLoading())
237 ++iter; 240 ++iter;
238 else 241 else
239 ui_test_utils::RunMessageLoop(); 242 ui_test_utils::RunMessageLoop();
240 } 243 }
241 244
242 timeout.Cancel(); 245 timeout.Cancel();
243 return true; 246 return true;
244 } 247 }
245 248
246 void Observe(int type, 249 void Observe(int type,
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 content::CONSOLE_MESSAGE_LEVEL_LOG, 608 content::CONSOLE_MESSAGE_LEVEL_LOG,
606 "log"); 609 "log");
607 devtools_manager->AddMessageToConsole(agent_host, 610 devtools_manager->AddMessageToConsole(agent_host,
608 content::CONSOLE_MESSAGE_LEVEL_ERROR, 611 content::CONSOLE_MESSAGE_LEVEL_ERROR,
609 "error"); 612 "error");
610 RunTestFunction(window_, "checkLogAndErrorMessages"); 613 RunTestFunction(window_, "checkLogAndErrorMessages");
611 CloseDevToolsWindow(); 614 CloseDevToolsWindow();
612 } 615 }
613 616
614 } // namespace 617 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698