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

Side by Side Diff: chrome/browser/extensions/extension_devtools_browsertests.cc

Issue 6990059: DevTools: devtools message plumbing between worker and page processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed, WebWorkerBase::DevToolsDelegate removed Created 9 years, 7 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) 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/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "chrome/browser/debugger/devtools_client_host.h" 7 #include "chrome/browser/debugger/devtools_client_host.h"
8 #include "chrome/browser/debugger/devtools_manager.h" 8 #include "chrome/browser/debugger/devtools_manager.h"
9 #include "chrome/browser/extensions/extension_devtools_browsertest.h" 9 #include "chrome/browser/extensions/extension_devtools_browsertest.h"
10 #include "chrome/browser/extensions/extension_error_reporter.h" 10 #include "chrome/browser/extensions/extension_error_reporter.h"
11 #include "chrome/browser/extensions/extension_host.h" 11 #include "chrome/browser/extensions/extension_host.h"
12 #include "chrome/browser/extensions/extension_process_manager.h" 12 #include "chrome/browser/extensions/extension_process_manager.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/extensions/extension_tabs_module.h" 14 #include "chrome/browser/extensions/extension_tabs_module.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/tabs/tab_strip_model.h" 16 #include "chrome/browser/tabs/tab_strip_model.h"
17 #include "chrome/browser/ui/browser_list.h" 17 #include "chrome/browser/ui/browser_list.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/devtools_messages.h"
20 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
21 #include "chrome/test/ui_test_utils.h" 20 #include "chrome/test/ui_test_utils.h"
22 #include "content/browser/renderer_host/render_view_host.h" 21 #include "content/browser/renderer_host/render_view_host.h"
23 #include "content/browser/site_instance.h" 22 #include "content/browser/site_instance.h"
24 #include "content/browser/tab_contents/tab_contents.h" 23 #include "content/browser/tab_contents/tab_contents.h"
24 #include "content/common/devtools_messages.h"
25 #include "net/base/net_util.h" 25 #include "net/base/net_util.h"
26 26
27 // Looks for an ExtensionHost whose URL has the given path component (including 27 // Looks for an ExtensionHost whose URL has the given path component (including
28 // leading slash). Also verifies that the expected number of hosts are loaded. 28 // leading slash). Also verifies that the expected number of hosts are loaded.
29 static ExtensionHost* FindHostWithPath(ExtensionProcessManager* manager, 29 static ExtensionHost* FindHostWithPath(ExtensionProcessManager* manager,
30 const std::string& path, 30 const std::string& path,
31 int expected_hosts) { 31 int expected_hosts) {
32 ExtensionHost* host = NULL; 32 ExtensionHost* host = NULL;
33 int num_hosts = 0; 33 int num_hosts = 0;
34 for (ExtensionProcessManager::const_iterator iter = manager->begin(); 34 for (ExtensionProcessManager::const_iterator iter = manager->begin();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 // Removing the listeners from the second extension should tear the bridge 151 // Removing the listeners from the second extension should tear the bridge
152 // down. 152 // down.
153 result = false; 153 result = false;
154 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 154 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
155 host_two->render_view_host(), L"", L"unregisterListeners()", &result)); 155 host_two->render_view_host(), L"", L"unregisterListeners()", &result));
156 EXPECT_TRUE(result); 156 EXPECT_TRUE(result);
157 ASSERT_FALSE(devtools_manager->GetDevToolsClientHostFor( 157 ASSERT_FALSE(devtools_manager->GetDevToolsClientHostFor(
158 tab_contents->render_view_host())); 158 tab_contents->render_view_host()));
159 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698