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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 23658056: content: Move kHttpScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 ui_test_utils::NavigateToURL(browser(), file_url); 935 ui_test_utils::NavigateToURL(browser(), file_url);
936 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); 936 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
937 } 937 }
938 938
939 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) { 939 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) {
940 CommandUpdater* command_updater = 940 CommandUpdater* command_updater =
941 browser()->command_controller()->command_updater(); 941 browser()->command_controller()->command_updater();
942 942
943 ASSERT_TRUE(test_server()->Start()); 943 ASSERT_TRUE(test_server()->Start());
944 GURL http_url(test_server()->GetURL(std::string())); 944 GURL http_url(test_server()->GetURL(std::string()));
945 ASSERT_TRUE(http_url.SchemeIs(chrome::kHttpScheme)); 945 ASSERT_TRUE(http_url.SchemeIs(content::kHttpScheme));
946 ui_test_utils::NavigateToURL(browser(), http_url); 946 ui_test_utils::NavigateToURL(browser(), http_url);
947 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); 947 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
948 } 948 }
949 949
950 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttps) { 950 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttps) {
951 CommandUpdater* command_updater = 951 CommandUpdater* command_updater =
952 browser()->command_controller()->command_updater(); 952 browser()->command_controller()->command_updater();
953 953
954 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_HTTPS, 954 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_HTTPS,
955 net::SpawnedTestServer::kLocalhost, 955 net::SpawnedTestServer::kLocalhost,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 GURL blank_url(content::kAboutBlankURL); 995 GURL blank_url(content::kAboutBlankURL);
996 ui_test_utils::NavigateToURL(browser(), blank_url); 996 ui_test_utils::NavigateToURL(browser(), blank_url);
997 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); 997 EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
998 } 998 }
999 999
1000 // Change a tab into an application window. 1000 // Change a tab into an application window.
1001 // DISABLED: http://crbug.com/72310 1001 // DISABLED: http://crbug.com/72310
1002 IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_ConvertTabToAppShortcut) { 1002 IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_ConvertTabToAppShortcut) {
1003 ASSERT_TRUE(test_server()->Start()); 1003 ASSERT_TRUE(test_server()->Start());
1004 GURL http_url(test_server()->GetURL(std::string())); 1004 GURL http_url(test_server()->GetURL(std::string()));
1005 ASSERT_TRUE(http_url.SchemeIs(chrome::kHttpScheme)); 1005 ASSERT_TRUE(http_url.SchemeIs(content::kHttpScheme));
1006 1006
1007 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 1007 ASSERT_EQ(1, browser()->tab_strip_model()->count());
1008 WebContents* initial_tab = browser()->tab_strip_model()->GetWebContentsAt(0); 1008 WebContents* initial_tab = browser()->tab_strip_model()->GetWebContentsAt(0);
1009 WebContents* app_tab = chrome::AddSelectedTabWithURL( 1009 WebContents* app_tab = chrome::AddSelectedTabWithURL(
1010 browser(), http_url, content::PAGE_TRANSITION_TYPED); 1010 browser(), http_url, content::PAGE_TRANSITION_TYPED);
1011 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 1011 ASSERT_EQ(2, browser()->tab_strip_model()->count());
1012 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(), 1012 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(),
1013 browser()->host_desktop_type())); 1013 browser()->host_desktop_type()));
1014 1014
1015 // Normal tabs should accept load drops. 1015 // Normal tabs should accept load drops.
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 exp_commit_size.Enlarge(wcv_resize_insets.width(), 2415 exp_commit_size.Enlarge(wcv_resize_insets.width(),
2416 wcv_resize_insets.height() + height_inset); 2416 wcv_resize_insets.height() + height_inset);
2417 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2417 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2418 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2418 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2419 // Sizes of RenderWidgetHostView and WebContentsView before and after 2419 // Sizes of RenderWidgetHostView and WebContentsView before and after
2420 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. 2420 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same.
2421 EXPECT_EQ(rwhv_commit_size2, 2421 EXPECT_EQ(rwhv_commit_size2,
2422 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2422 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2423 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); 2423 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize());
2424 } 2424 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698