| OLD | NEW |
| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // this method is running. | 238 // this method is running. |
| 239 | 239 |
| 240 content::NotificationRegistrar registrar; | 240 content::NotificationRegistrar registrar; |
| 241 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, | 241 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
| 242 content::NotificationService::AllSources()); | 242 content::NotificationService::AllSources()); |
| 243 base::CancelableClosure timeout( | 243 base::CancelableClosure timeout( |
| 244 base::Bind(&TimeoutCallback, "Extension host load timed out.")); | 244 base::Bind(&TimeoutCallback, "Extension host load timed out.")); |
| 245 base::MessageLoop::current()->PostDelayedTask( | 245 base::MessageLoop::current()->PostDelayedTask( |
| 246 FROM_HERE, timeout.callback(), TestTimeouts::action_timeout()); | 246 FROM_HERE, timeout.callback(), TestTimeouts::action_timeout()); |
| 247 | 247 |
| 248 ExtensionProcessManager* manager = | 248 extensions::ProcessManager* manager = |
| 249 extensions::ExtensionSystem::Get(browser()->profile())-> | 249 extensions::ExtensionSystem::Get(browser()->profile())-> |
| 250 process_manager(); | 250 process_manager(); |
| 251 ExtensionProcessManager::ViewSet all_views = manager->GetAllViews(); | 251 extensions::ProcessManager::ViewSet all_views = manager->GetAllViews(); |
| 252 for (ExtensionProcessManager::ViewSet::const_iterator iter = | 252 for (extensions::ProcessManager::ViewSet::const_iterator iter = |
| 253 all_views.begin(); | 253 all_views.begin(); |
| 254 iter != all_views.end();) { | 254 iter != all_views.end();) { |
| 255 if (!(*iter)->IsLoading()) | 255 if (!(*iter)->IsLoading()) |
| 256 ++iter; | 256 ++iter; |
| 257 else | 257 else |
| 258 content::RunMessageLoop(); | 258 content::RunMessageLoop(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 timeout.Cancel(); | 261 timeout.Cancel(); |
| 262 return true; | 262 return true; |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 #if defined(OS_WIN) && defined(USE_ASH) | 699 #if defined(OS_WIN) && defined(USE_ASH) |
| 700 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 700 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| 701 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 701 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| 702 return; | 702 return; |
| 703 #endif | 703 #endif |
| 704 | 704 |
| 705 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; | 705 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; |
| 706 } | 706 } |
| 707 | 707 |
| 708 } // namespace | 708 } // namespace |
| OLD | NEW |