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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 void RunTestCasesWithActiveItem(const DownloadTestCase test_cases[], | 245 void RunTestCasesWithActiveItem(const DownloadTestCase test_cases[], |
246 size_t test_case_count); | 246 size_t test_case_count); |
247 | 247 |
248 // Verifies that |target_path|, |disposition|, |expected_danger_type| and | 248 // Verifies that |target_path|, |disposition|, |expected_danger_type| and |
249 // |intermediate_path| matches the expectations of |test_case|. Posts | 249 // |intermediate_path| matches the expectations of |test_case|. Posts |
250 // |closure| to the current message loop when done. | 250 // |closure| to the current message loop when done. |
251 void VerifyDownloadTarget(const DownloadTestCase& test_case, | 251 void VerifyDownloadTarget(const DownloadTestCase& test_case, |
252 const DownloadTargetInfo* target_info); | 252 const DownloadTargetInfo* target_info); |
253 | 253 |
254 const base::FilePath& test_download_dir() const { | 254 const base::FilePath& test_download_dir() const { |
255 return test_download_dir_.path(); | 255 return test_download_dir_.GetPath(); |
256 } | 256 } |
257 | 257 |
258 const base::FilePath& test_virtual_dir() const { | 258 const base::FilePath& test_virtual_dir() const { |
259 return test_virtual_dir_; | 259 return test_virtual_dir_; |
260 } | 260 } |
261 | 261 |
262 MockDownloadTargetDeterminerDelegate* delegate() { | 262 MockDownloadTargetDeterminerDelegate* delegate() { |
263 return &delegate_; | 263 return &delegate_; |
264 } | 264 } |
265 | 265 |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2138 EXPECT_CALL(mock_plugin_filter_, MockPluginAvailable(browser_plugin.path())) | 2138 EXPECT_CALL(mock_plugin_filter_, MockPluginAvailable(browser_plugin.path())) |
2139 .WillRepeatedly(Return(false)); | 2139 .WillRepeatedly(Return(false)); |
2140 target_info = RunDownloadTargetDeterminer( | 2140 target_info = RunDownloadTargetDeterminer( |
2141 GetPathInDownloadDir(kInitialPath), item.get()); | 2141 GetPathInDownloadDir(kInitialPath), item.get()); |
2142 EXPECT_FALSE(target_info->is_filetype_handled_safely); | 2142 EXPECT_FALSE(target_info->is_filetype_handled_safely); |
2143 } | 2143 } |
2144 | 2144 |
2145 #endif // defined(ENABLE_PLUGINS) | 2145 #endif // defined(ENABLE_PLUGINS) |
2146 | 2146 |
2147 } // namespace | 2147 } // namespace |
OLD | NEW |