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

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

Issue 2321453002: c/browser, c/common, components S-W: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 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
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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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_.GetPath().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,
(...skipping 10 matching lines...) Expand all
2183 2183
2184 #if defined(OS_WIN) 2184 #if defined(OS_WIN)
2185 // This test verifies that Chrome can be launched with a user-data-dir path 2185 // This test verifies that Chrome can be launched with a user-data-dir path
2186 // which trailing slashes. 2186 // which trailing slashes.
2187 class LaunchBrowserWithTrailingSlashDatadir : public BrowserTest { 2187 class LaunchBrowserWithTrailingSlashDatadir : public BrowserTest {
2188 public: 2188 public:
2189 LaunchBrowserWithTrailingSlashDatadir() {} 2189 LaunchBrowserWithTrailingSlashDatadir() {}
2190 2190
2191 void SetUpCommandLine(base::CommandLine* command_line) override { 2191 void SetUpCommandLine(base::CommandLine* command_line) override {
2192 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 2192 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
2193 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile"); 2193 base::FilePath tmp_profile = temp_dir_.GetPath().AppendASCII("tmp_profile");
2194 tmp_profile = tmp_profile.Append(L"Test Chrome\\"); 2194 tmp_profile = tmp_profile.Append(L"Test Chrome\\");
2195 2195
2196 ASSERT_TRUE(base::CreateDirectory(tmp_profile)); 2196 ASSERT_TRUE(base::CreateDirectory(tmp_profile));
2197 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile); 2197 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile);
2198 } 2198 }
2199 2199
2200 base::ScopedTempDir temp_dir_; 2200 base::ScopedTempDir temp_dir_;
2201 }; 2201 };
2202 2202
2203 IN_PROC_BROWSER_TEST_F(LaunchBrowserWithTrailingSlashDatadir, 2203 IN_PROC_BROWSER_TEST_F(LaunchBrowserWithTrailingSlashDatadir,
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 Browser* browser = new Browser(params); 2848 Browser* browser = new Browser(params);
2849 gfx::Rect bounds = browser->window()->GetBounds(); 2849 gfx::Rect bounds = browser->window()->GetBounds();
2850 2850
2851 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 2851 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
2852 // See https://crbug.com/567925. 2852 // See https://crbug.com/567925.
2853 EXPECT_GE(bounds.width(), 100); 2853 EXPECT_GE(bounds.width(), 100);
2854 EXPECT_EQ(122, bounds.height()); 2854 EXPECT_EQ(122, bounds.height());
2855 browser->window()->Close(); 2855 browser->window()->Close();
2856 } 2856 }
2857 } 2857 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698