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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 window_ = DevToolsWindow::CreateDevToolsWindowForWorker(profile); | 382 window_ = DevToolsWindow::CreateDevToolsWindowForWorker(profile); |
383 window_->Show(DEVTOOLS_TOGGLE_ACTION_NONE); | 383 window_->Show(DEVTOOLS_TOGGLE_ACTION_NONE); |
384 DevToolsAgentHost* agent_host = | 384 DevToolsAgentHost* agent_host = |
385 DevToolsAgentHostRegistry::GetDevToolsAgentHostForWorker( | 385 DevToolsAgentHostRegistry::GetDevToolsAgentHostForWorker( |
386 worker_data->worker_process_id, | 386 worker_data->worker_process_id, |
387 worker_data->worker_route_id); | 387 worker_data->worker_route_id); |
388 DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor( | 388 DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor( |
389 agent_host, | 389 agent_host, |
390 window_->devtools_client_host()); | 390 window_->devtools_client_host()); |
391 RenderViewHost* client_rvh = window_->GetRenderViewHost(); | 391 RenderViewHost* client_rvh = window_->GetRenderViewHost(); |
392 WebContents* client_contents = client_rvh->delegate()->GetAsWebContents(); | 392 WebContents* client_contents = |
| 393 client_rvh->GetDelegate()->GetAsWebContents(); |
393 if (client_contents->IsLoading()) { | 394 if (client_contents->IsLoading()) { |
394 ui_test_utils::WindowedNotificationObserver observer( | 395 ui_test_utils::WindowedNotificationObserver observer( |
395 content::NOTIFICATION_LOAD_STOP, | 396 content::NOTIFICATION_LOAD_STOP, |
396 content::Source<NavigationController>( | 397 content::Source<NavigationController>( |
397 &client_contents->GetController())); | 398 &client_contents->GetController())); |
398 observer.Wait(); | 399 observer.Wait(); |
399 } | 400 } |
400 } | 401 } |
401 | 402 |
402 void CloseDevToolsWindow() { | 403 void CloseDevToolsWindow() { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 | 577 |
577 // Reload page to restart the worker. | 578 // Reload page to restart the worker. |
578 ui_test_utils::NavigateToURL(browser(), url); | 579 ui_test_utils::NavigateToURL(browser(), url); |
579 | 580 |
580 // Wait until worker script is paused on the debugger statement. | 581 // Wait until worker script is paused on the debugger statement. |
581 RunTestFunction(window_, "testPauseInSharedWorkerInitialization"); | 582 RunTestFunction(window_, "testPauseInSharedWorkerInitialization"); |
582 CloseDevToolsWindow(); | 583 CloseDevToolsWindow(); |
583 } | 584 } |
584 | 585 |
585 } // namespace | 586 } // namespace |
OLD | NEW |