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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 // which contains non ASCII characters. | 2078 // which contains non ASCII characters. |
2079 class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest { | 2079 class LaunchBrowserWithNonAsciiUserDatadir : public BrowserTest { |
2080 public: | 2080 public: |
2081 LaunchBrowserWithNonAsciiUserDatadir() {} | 2081 LaunchBrowserWithNonAsciiUserDatadir() {} |
2082 | 2082 |
2083 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 2083 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
2084 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 2084 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
2085 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile"); | 2085 base::FilePath tmp_profile = temp_dir_.path().AppendASCII("tmp_profile"); |
2086 tmp_profile = tmp_profile.Append(L"Test Chrome G\u00E9raldine"); | 2086 tmp_profile = tmp_profile.Append(L"Test Chrome G\u00E9raldine"); |
2087 | 2087 |
2088 ASSERT_TRUE(file_util::CreateDirectory(tmp_profile)); | 2088 ASSERT_TRUE(base::CreateDirectory(tmp_profile)); |
2089 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile); | 2089 command_line->AppendSwitchPath(switches::kUserDataDir, tmp_profile); |
2090 } | 2090 } |
2091 | 2091 |
2092 base::ScopedTempDir temp_dir_; | 2092 base::ScopedTempDir temp_dir_; |
2093 }; | 2093 }; |
2094 | 2094 |
2095 IN_PROC_BROWSER_TEST_F(LaunchBrowserWithNonAsciiUserDatadir, | 2095 IN_PROC_BROWSER_TEST_F(LaunchBrowserWithNonAsciiUserDatadir, |
2096 TestNonAsciiUserDataDir) { | 2096 TestNonAsciiUserDataDir) { |
2097 // Verify that the window is present. | 2097 // Verify that the window is present. |
2098 ASSERT_TRUE(browser()); | 2098 ASSERT_TRUE(browser()); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2552 exp_commit_size.Enlarge(wcv_resize_insets.width(), | 2552 exp_commit_size.Enlarge(wcv_resize_insets.width(), |
2553 wcv_resize_insets.height() + height_inset); | 2553 wcv_resize_insets.height() + height_inset); |
2554 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); | 2554 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); |
2555 EXPECT_EQ(exp_commit_size, wcv_commit_size2); | 2555 EXPECT_EQ(exp_commit_size, wcv_commit_size2); |
2556 // Sizes of RenderWidgetHostView and WebContentsView before and after | 2556 // Sizes of RenderWidgetHostView and WebContentsView before and after |
2557 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. | 2557 // WebContentsDelegate::DidNavigateMainFramePostCommit should be the same. |
2558 EXPECT_EQ(rwhv_commit_size2, | 2558 EXPECT_EQ(rwhv_commit_size2, |
2559 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); | 2559 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); |
2560 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); | 2560 EXPECT_EQ(wcv_commit_size2, web_contents->GetView()->GetContainerSize()); |
2561 } | 2561 } |
OLD | NEW |