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

Side by Side Diff: chrome/browser/devtools/devtools_sanity_browsertest.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 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 | Annotate | Revision Log
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"
11 #include "base/prefs/pref_service.h"
11 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
12 #include "base/test/test_timeouts.h" 13 #include "base/test/test_timeouts.h"
13 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h" 15 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h"
15 #include "chrome/browser/devtools/devtools_window.h" 16 #include "chrome/browser/devtools/devtools_window.h"
16 #include "chrome/browser/extensions/extension_apitest.h" 17 #include "chrome/browser/extensions/extension_apitest.h"
17 #include "chrome/browser/extensions/extension_browsertest.h" 18 #include "chrome/browser/extensions/extension_browsertest.h"
18 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/extensions/extension_system.h" 20 #include "chrome/browser/extensions/extension_system.h"
20 #include "chrome/browser/extensions/unpacked_installer.h" 21 #include "chrome/browser/extensions/unpacked_installer.h"
21 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/ui/browser.h" 23 #include "chrome/browser/ui/browser.h"
23 #include "chrome/browser/ui/browser_commands.h" 24 #include "chrome/browser/ui/browser_commands.h"
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" 25 #include "chrome/browser/ui/tabs/tab_strip_model.h"
25 #include "chrome/common/chrome_notification_types.h" 26 #include "chrome/common/chrome_notification_types.h"
26 #include "chrome/common/chrome_paths.h" 27 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
29 #include "chrome/common/pref_names.h"
28 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
29 #include "chrome/test/base/in_process_browser_test.h" 31 #include "chrome/test/base/in_process_browser_test.h"
30 #include "chrome/test/base/ui_test_utils.h" 32 #include "chrome/test/base/ui_test_utils.h"
31 #include "content/public/browser/child_process_data.h" 33 #include "content/public/browser/child_process_data.h"
32 #include "content/public/browser/content_browser_client.h" 34 #include "content/public/browser/content_browser_client.h"
33 #include "content/public/browser/devtools_agent_host.h" 35 #include "content/public/browser/devtools_agent_host.h"
34 #include "content/public/browser/devtools_client_host.h" 36 #include "content/public/browser/devtools_client_host.h"
35 #include "content/public/browser/devtools_http_handler.h" 37 #include "content/public/browser/devtools_http_handler.h"
36 #include "content/public/browser/devtools_manager.h" 38 #include "content/public/browser/devtools_manager.h"
37 #include "content/public/browser/notification_registrar.h" 39 #include "content/public/browser/notification_registrar.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 421 }
420 422
421 // Tests that scripts tab is populated with inspected scripts even if it 423 // Tests that scripts tab is populated with inspected scripts even if it
422 // hadn't been shown by the moment inspected paged refreshed. 424 // hadn't been shown by the moment inspected paged refreshed.
423 // @see http://crbug.com/26312 425 // @see http://crbug.com/26312
424 IN_PROC_BROWSER_TEST_F( 426 IN_PROC_BROWSER_TEST_F(
425 DevToolsSanityTest, 427 DevToolsSanityTest,
426 TestScriptsTabIsPopulatedOnInspectedPageRefresh) { 428 TestScriptsTabIsPopulatedOnInspectedPageRefresh) {
427 // Clear inspector settings to ensure that Elements will be 429 // Clear inspector settings to ensure that Elements will be
428 // current panel when DevTools window is open. 430 // current panel when DevTools window is open.
429 content::GetContentClient()->browser()->ClearInspectorSettings( 431 content::BrowserContext* browser_context =
430 GetInspectedTab()->GetRenderViewHost()); 432 GetInspectedTab()->GetBrowserContext();
433 Profile::FromBrowserContext(browser_context)->GetPrefs()->
434 ClearPref(prefs::kWebKitInspectorSettings);
435
431 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh", 436 RunTest("testScriptsTabIsPopulatedOnInspectedPageRefresh",
432 kDebuggerTestPage); 437 kDebuggerTestPage);
433 } 438 }
434 439
435 // Tests that chrome.devtools extension is correctly exposed. 440 // Tests that chrome.devtools extension is correctly exposed.
436 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest, 441 IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest,
437 TestDevToolsExtensionAPI) { 442 TestDevToolsExtensionAPI) {
438 LoadExtension("devtools_extension"); 443 LoadExtension("devtools_extension");
439 RunTest("waitForTestResultsInConsole", ""); 444 RunTest("waitForTestResultsInConsole", "");
440 } 445 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); 642 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
638 test_data_dir_ = test_data_dir_.AppendASCII("devtools"); 643 test_data_dir_ = test_data_dir_.AppendASCII("devtools");
639 } 644 }
640 }; 645 };
641 646
642 IN_PROC_BROWSER_TEST_F(RemoteDebuggingTest, RemoteDebugger) { 647 IN_PROC_BROWSER_TEST_F(RemoteDebuggingTest, RemoteDebugger) {
643 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; 648 ASSERT_TRUE(RunExtensionTest("target_list")) << message_;
644 } 649 }
645 650
646 } // namespace 651 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_browsertest.cc ('k') | chrome/browser/download/download_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698