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

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

Issue 1100223002: Update {virtual,override} to follow C++11 style in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 ASSERT_FALSE(browser()->window()->IsFullscreenBubbleVisible()); 2150 ASSERT_FALSE(browser()->window()->IsFullscreenBubbleVisible());
2151 } 2151 }
2152 2152
2153 #if defined(OS_WIN) 2153 #if defined(OS_WIN)
2154 // This test verifies that Chrome can be launched with a user-data-dir path 2154 // This test verifies that Chrome can be launched with a user-data-dir path
2155 // which contains non ASCII characters. 2155 // which contains non ASCII characters.
2156 class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest { 2156 class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest {
2157 public: 2157 public:
2158 LaunchBrowserWithNonAsciiUserDatadir() {} 2158 LaunchBrowserWithNonAsciiUserDatadir() {}
2159 2159
2160 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 2160 void SetUpCommandLine(base::CommandLine* command_line) override {
2161 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 2161 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
2162 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile"); 2162 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile");
2163 tmp_profile = tmp_profile.Append(L"Test Chrome G\u00E9raldine"); 2163 tmp_profile = tmp_profile.Append(L"Test Chrome G\u00E9raldine");
2164 2164
2165 ASSERT_TRUE(base::CreateDirectory(tmp_profile)); 2165 ASSERT_TRUE(base::CreateDirectory(tmp_profile));
2166 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile); 2166 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile);
2167 } 2167 }
2168 2168
2169 base::ScopedTempDir temp_dir_; 2169 base::ScopedTempDir temp_dir_;
2170 }; 2170 };
2171 2171
2172 IN_PROC_BROWSER_TEST_F(LaunchBrowserWithNonAsciiUserDatadir, 2172 IN_PROC_BROWSER_TEST_F(LaunchBrowserWithNonAsciiUserDatadir,
2173 TestNonAsciiUserDataDir) { 2173 TestNonAsciiUserDataDir) {
2174 // Verify that the window is present. 2174 // Verify that the window is present.
2175 ASSERT_TRUE(browser()); 2175 ASSERT_TRUE(browser());
2176 ASSERT_TRUE(browser()->profile()); 2176 ASSERT_TRUE(browser()->profile());
2177 // Verify that the profile has been added correctly to the ProfileInfoCache. 2177 // Verify that the profile has been added correctly to the ProfileInfoCache.
2178 ASSERT_EQ(1u, g_browser_process->profile_manager()-> 2178 ASSERT_EQ(1u, g_browser_process->profile_manager()->
2179 GetProfileInfoCache().GetNumberOfProfiles()); 2179 GetProfileInfoCache().GetNumberOfProfiles());
2180 } 2180 }
2181 #endif // defined(OS_WIN) 2181 #endif // defined(OS_WIN)
2182 2182
2183 #if defined(OS_WIN) 2183 #if defined(OS_WIN)
2184 // This test verifies that Chrome can be launched with a user-data-dir path 2184 // This test verifies that Chrome can be launched with a user-data-dir path
2185 // which trailing slashes. 2185 // which trailing slashes.
2186 class LaunchBrowserWithTrailingSlashDatadir : public BrowserTest { 2186 class LaunchBrowserWithTrailingSlashDatadir : public BrowserTest {
2187 public: 2187 public:
2188 LaunchBrowserWithTrailingSlashDatadir() {} 2188 LaunchBrowserWithTrailingSlashDatadir() {}
2189 2189
2190 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 2190 void SetUpCommandLine(base::CommandLine* command_line) override {
2191 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 2191 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
2192 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile"); 2192 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile");
2193 tmp_profile = tmp_profile.Append(L"Test Chrome\\"); 2193 tmp_profile = tmp_profile.Append(L"Test Chrome\\");
2194 2194
2195 ASSERT_TRUE(base::CreateDirectory(tmp_profile)); 2195 ASSERT_TRUE(base::CreateDirectory(tmp_profile));
2196 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile); 2196 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile);
2197 } 2197 }
2198 2198
2199 base::ScopedTempDir temp_dir_; 2199 base::ScopedTempDir temp_dir_;
2200 }; 2200 };
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 #endif 2697 #endif
2698 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2698 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2699 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2699 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2700 gfx::Size exp_final_size(initial_wcv_size); 2700 gfx::Size exp_final_size(initial_wcv_size);
2701 exp_final_size.Enlarge(wcv_resize_insets.width(), 2701 exp_final_size.Enlarge(wcv_resize_insets.width(),
2702 wcv_resize_insets.height() + height_inset); 2702 wcv_resize_insets.height() + height_inset);
2703 EXPECT_EQ(exp_final_size, 2703 EXPECT_EQ(exp_final_size,
2704 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2704 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2705 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); 2705 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
2706 } 2706 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698