OLD | NEW |
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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 // on the Mac. http://crbug.com/13148 | 1006 // on the Mac. http://crbug.com/13148 |
1007 #if !defined(OS_MACOSX) | 1007 #if !defined(OS_MACOSX) |
1008 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFile) { | 1008 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFile) { |
1009 CommandUpdater* command_updater = | 1009 CommandUpdater* command_updater = |
1010 browser()->command_controller()->command_updater(); | 1010 browser()->command_controller()->command_updater(); |
1011 | 1011 |
1012 static const base::FilePath::CharType* kEmptyFile = | 1012 static const base::FilePath::CharType* kEmptyFile = |
1013 FILE_PATH_LITERAL("empty.html"); | 1013 FILE_PATH_LITERAL("empty.html"); |
1014 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( | 1014 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( |
1015 base::FilePath::kCurrentDirectory), base::FilePath(kEmptyFile))); | 1015 base::FilePath::kCurrentDirectory), base::FilePath(kEmptyFile))); |
1016 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme)); | 1016 ASSERT_TRUE(file_url.SchemeIs(content::kFileScheme)); |
1017 ui_test_utils::NavigateToURL(browser(), file_url); | 1017 ui_test_utils::NavigateToURL(browser(), file_url); |
1018 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); | 1018 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); |
1019 } | 1019 } |
1020 | 1020 |
1021 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) { | 1021 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttp) { |
1022 CommandUpdater* command_updater = | 1022 CommandUpdater* command_updater = |
1023 browser()->command_controller()->command_updater(); | 1023 browser()->command_controller()->command_updater(); |
1024 | 1024 |
1025 ASSERT_TRUE(test_server()->Start()); | 1025 ASSERT_TRUE(test_server()->Start()); |
1026 GURL http_url(test_server()->GetURL(std::string())); | 1026 GURL http_url(test_server()->GetURL(std::string())); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 #define MAYBE_FaviconChange DISABLED_FaviconChange | 1151 #define MAYBE_FaviconChange DISABLED_FaviconChange |
1152 #else | 1152 #else |
1153 #define MAYBE_FaviconChange FaviconChange | 1153 #define MAYBE_FaviconChange FaviconChange |
1154 #endif | 1154 #endif |
1155 // Test that an icon can be changed from JS. | 1155 // Test that an icon can be changed from JS. |
1156 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { | 1156 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { |
1157 static const base::FilePath::CharType* kFile = | 1157 static const base::FilePath::CharType* kFile = |
1158 FILE_PATH_LITERAL("onload_change_favicon.html"); | 1158 FILE_PATH_LITERAL("onload_change_favicon.html"); |
1159 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( | 1159 GURL file_url(ui_test_utils::GetTestUrl(base::FilePath( |
1160 base::FilePath::kCurrentDirectory), base::FilePath(kFile))); | 1160 base::FilePath::kCurrentDirectory), base::FilePath(kFile))); |
1161 ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme)); | 1161 ASSERT_TRUE(file_url.SchemeIs(content::kFileScheme)); |
1162 ui_test_utils::NavigateToURL(browser(), file_url); | 1162 ui_test_utils::NavigateToURL(browser(), file_url); |
1163 | 1163 |
1164 NavigationEntry* entry = browser()->tab_strip_model()-> | 1164 NavigationEntry* entry = browser()->tab_strip_model()-> |
1165 GetActiveWebContents()->GetController().GetActiveEntry(); | 1165 GetActiveWebContents()->GetController().GetActiveEntry(); |
1166 static const base::FilePath::CharType* kIcon = | 1166 static const base::FilePath::CharType* kIcon = |
1167 FILE_PATH_LITERAL("test1.png"); | 1167 FILE_PATH_LITERAL("test1.png"); |
1168 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath( | 1168 GURL expected_favicon_url(ui_test_utils::GetTestUrl(base::FilePath( |
1169 base::FilePath::kCurrentDirectory), base::FilePath(kIcon))); | 1169 base::FilePath::kCurrentDirectory), base::FilePath(kIcon))); |
1170 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); | 1170 EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); |
1171 } | 1171 } |
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2556 exp_commit_size.Enlarge(wcv_resize_insets.width(), | 2556 exp_commit_size.Enlarge(wcv_resize_insets.width(), |
2557 wcv_resize_insets.height() + height_inset); | 2557 wcv_resize_insets.height() + height_inset); |
2558 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2558 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
2559 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2559 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
2560 // Sizes of RenderWidgetHostView and WebContentsView before and after | 2560 // Sizes of RenderWidgetHostView and WebContentsView before and after |
2561 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. | 2561 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. |
2562 EXPECT_EQ(rwhv_commit_size2, | 2562 EXPECT_EQ(rwhv_commit_size2, |
2563 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2563 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
2564 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); | 2564 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); |
2565 } | 2565 } |
OLD | NEW |