OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "content/browser/tab_contents/tab_contents.h" | 25 #include "content/browser/tab_contents/tab_contents.h" |
26 #include "content/browser/worker_host/worker_process_host.h" | 26 #include "content/browser/worker_host/worker_process_host.h" |
27 #include "content/browser/worker_host/worker_service.h" | 27 #include "content/browser/worker_host/worker_service.h" |
28 #include "content/browser/worker_host/worker_service_observer.h" | 28 #include "content/browser/worker_host/worker_service_observer.h" |
29 #include "content/common/worker_messages.h" | 29 #include "content/common/worker_messages.h" |
30 #include "content/public/browser/content_browser_client.h" | 30 #include "content/public/browser/content_browser_client.h" |
31 #include "content/public/browser/notification_registrar.h" | 31 #include "content/public/browser/notification_registrar.h" |
32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
33 #include "net/test/test_server.h" | 33 #include "net/test/test_server.h" |
34 | 34 |
| 35 using content::BrowserThread; |
| 36 |
35 namespace { | 37 namespace { |
36 | 38 |
37 // Used to block until a dev tools client window's browser is closed. | 39 // Used to block until a dev tools client window's browser is closed. |
38 class BrowserClosedObserver : public content::NotificationObserver { | 40 class BrowserClosedObserver : public content::NotificationObserver { |
39 public: | 41 public: |
40 explicit BrowserClosedObserver(Browser* browser) { | 42 explicit BrowserClosedObserver(Browser* browser) { |
41 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, | 43 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, |
42 content::Source<Browser>(browser)); | 44 content::Source<Browser>(browser)); |
43 ui_test_utils::RunMessageLoop(); | 45 ui_test_utils::RunMessageLoop(); |
44 } | 46 } |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 548 |
547 // Reload page to restart the worker. | 549 // Reload page to restart the worker. |
548 ui_test_utils::NavigateToURL(browser(), url); | 550 ui_test_utils::NavigateToURL(browser(), url); |
549 | 551 |
550 // Wait until worker script is paused on the debugger statement. | 552 // Wait until worker script is paused on the debugger statement. |
551 RunTestFuntion(window_, "testPauseInSharedWorkerInitialization"); | 553 RunTestFuntion(window_, "testPauseInSharedWorkerInitialization"); |
552 CloseDevToolsWindow(); | 554 CloseDevToolsWindow(); |
553 } | 555 } |
554 | 556 |
555 } // namespace | 557 } // namespace |
OLD | NEW |