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

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

Issue 1174533002: [DevTools] Add DevToolsSanityTest.TestSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1157633007
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 #endif 805 #endif
806 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestConsoleOnNavigateBack) { 806 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, MAYBE_TestConsoleOnNavigateBack) {
807 RunTest("testConsoleOnNavigateBack", kNavigateBackTestPage); 807 RunTest("testConsoleOnNavigateBack", kNavigateBackTestPage);
808 } 808 }
809 809
810 // https://crbug.com/397889 810 // https://crbug.com/397889
811 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestDeviceEmulation) { 811 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, DISABLED_TestDeviceEmulation) {
812 RunTest("testDeviceMetricsOverrides", "about:blank"); 812 RunTest("testDeviceMetricsOverrides", "about:blank");
813 } 813 }
814 814
815 // Tests that settings are stored in profile correctly.
816 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestSettings) {
817 OpenDevToolsWindow("about:blank", true);
818 RunTestFunction(window_, "testSettings");
819 CloseDevToolsWindow();
820 }
821
815 // Tests that external navigation from inspector page is always handled by 822 // Tests that external navigation from inspector page is always handled by
816 // DevToolsWindow and results in inspected page navigation. 823 // DevToolsWindow and results in inspected page navigation.
817 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsExternalNavigation) { 824 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsExternalNavigation) {
818 OpenDevToolsWindow(kDebuggerTestPage, true); 825 OpenDevToolsWindow(kDebuggerTestPage, true);
819 GURL url = test_server()->GetURL(kNavigateBackTestPage); 826 GURL url = test_server()->GetURL(kNavigateBackTestPage);
820 ui_test_utils::UrlLoadObserver observer(url, 827 ui_test_utils::UrlLoadObserver observer(url,
821 content::NotificationService::AllSources()); 828 content::NotificationService::AllSources());
822 ASSERT_TRUE(content::ExecuteScript( 829 ASSERT_TRUE(content::ExecuteScript(
823 main_web_contents(), 830 main_web_contents(),
824 std::string("window.location = \"") + url.spec() + "\"")); 831 std::string("window.location = \"") + url.spec() + "\""));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDevToolsDisabled, true); 965 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDevToolsDisabled, true);
959 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); 966 ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
960 content::WebContents* web_contents = 967 content::WebContents* web_contents =
961 browser()->tab_strip_model()->GetWebContentsAt(0); 968 browser()->tab_strip_model()->GetWebContentsAt(0);
962 scoped_refptr<content::DevToolsAgentHost> agent( 969 scoped_refptr<content::DevToolsAgentHost> agent(
963 content::DevToolsAgentHost::GetOrCreateFor(web_contents)); 970 content::DevToolsAgentHost::GetOrCreateFor(web_contents));
964 DevToolsWindow::OpenDevToolsWindow(web_contents); 971 DevToolsWindow::OpenDevToolsWindow(web_contents);
965 DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(agent.get()); 972 DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(agent.get());
966 ASSERT_FALSE(window); 973 ASSERT_FALSE(window);
967 } 974 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698