OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <shlwapi.h> | 5 #include <shlwapi.h> |
6 #include <sstream> | 6 #include <sstream> |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 EXPECT_TRUE(file_util::Delete(file_on_client, false)); | 95 EXPECT_TRUE(file_util::Delete(file_on_client, false)); |
96 } | 96 } |
97 | 97 |
98 void CleanUpDownload(const std::wstring& file) { | 98 void CleanUpDownload(const std::wstring& file) { |
99 CleanUpDownload(file, file); | 99 CleanUpDownload(file, file); |
100 } | 100 } |
101 | 101 |
102 virtual void SetUp() { | 102 virtual void SetUp() { |
103 UITest::SetUp(); | 103 UITest::SetUp(); |
104 download_prefix_ = GetDownloadDirectory(); | 104 download_prefix_ = GetDownloadDirectory(); |
105 download_prefix_ += file_util::kPathSeparator; | 105 download_prefix_ += FilePath::kSeparators[0]; |
106 } | 106 } |
107 | 107 |
108 protected: | 108 protected: |
109 void RunSizeTest(const wstring& url, | 109 void RunSizeTest(const wstring& url, |
110 const wstring& expected_title_in_progress, | 110 const wstring& expected_title_in_progress, |
111 const wstring& expected_title_finished) { | 111 const wstring& expected_title_finished) { |
112 { | 112 { |
113 EXPECT_EQ(1, GetTabCount()); | 113 EXPECT_EQ(1, GetTabCount()); |
114 | 114 |
115 NavigateToURL(GURL(url)); | 115 NavigateToURL(GURL(url)); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 RunSizeTest(url, L"32.0 KB - " + filename, L"100% - " + filename); | 233 RunSizeTest(url, L"32.0 KB - " + filename, L"100% - " + filename); |
234 } | 234 } |
235 | 235 |
236 // http://b/1158253 | 236 // http://b/1158253 |
237 TEST_F(DownloadTest, DISABLED_KnownSize) { | 237 TEST_F(DownloadTest, DISABLED_KnownSize) { |
238 std::wstring url(URLRequestSlowDownloadJob::kKnownSizeUrl); | 238 std::wstring url(URLRequestSlowDownloadJob::kKnownSizeUrl); |
239 std::wstring filename = file_util::GetFilenameFromPath(url); | 239 std::wstring filename = file_util::GetFilenameFromPath(url); |
240 RunSizeTest(url, L"71% - " + filename, L"100% - " + filename); | 240 RunSizeTest(url, L"71% - " + filename, L"100% - " + filename); |
241 } | 241 } |
242 | 242 |
OLD | NEW |