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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/download_manager.h" | 8 #include "chrome/browser/download/download_manager.h" |
9 #include "chrome/browser/download_util.h" | 9 #include "chrome/browser/download/download_util.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 class DownloadManagerTest : public testing::Test { | 12 class DownloadManagerTest : public testing::Test { |
13 public: | 13 public: |
14 DownloadManagerTest() { | 14 DownloadManagerTest() { |
15 download_manager_ = new DownloadManager(); | 15 download_manager_ = new DownloadManager(); |
16 download_util::InitializeExeTypes(&download_manager_->exe_types_); | 16 download_util::InitializeExeTypes(&download_manager_->exe_types_); |
17 } | 17 } |
18 | 18 |
19 void GetGeneratedFilename(const std::string& content_disposition, | 19 void GetGeneratedFilename(const std::string& content_disposition, |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 for (int i = 0; i < arraysize(kGeneratedFiles); ++i) { | 311 for (int i = 0; i < arraysize(kGeneratedFiles); ++i) { |
312 std::wstring file_name; | 312 std::wstring file_name; |
313 GetGeneratedFilename(kGeneratedFiles[i].disposition, | 313 GetGeneratedFilename(kGeneratedFiles[i].disposition, |
314 kGeneratedFiles[i].url, | 314 kGeneratedFiles[i].url, |
315 kGeneratedFiles[i].mime_type, | 315 kGeneratedFiles[i].mime_type, |
316 &file_name); | 316 &file_name); |
317 EXPECT_EQ(kGeneratedFiles[i].expected_name, file_name); | 317 EXPECT_EQ(kGeneratedFiles[i].expected_name, file_name); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
OLD | NEW |