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

Side by Side Diff: chrome/browser/download/download_target_determiner_unittest.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 (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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 .WillByDefault(Return(test_case.mime_type)); 311 .WillByDefault(Return(test_case.mime_type));
312 ON_CALL(*item, GetReferrerUrl()) 312 ON_CALL(*item, GetReferrerUrl())
313 .WillByDefault(ReturnRefOfCopy(download_url)); 313 .WillByDefault(ReturnRefOfCopy(download_url));
314 ON_CALL(*item, GetState()) 314 ON_CALL(*item, GetState())
315 .WillByDefault(Return(DownloadItem::IN_PROGRESS)); 315 .WillByDefault(Return(DownloadItem::IN_PROGRESS));
316 ON_CALL(*item, GetTargetDisposition()) 316 ON_CALL(*item, GetTargetDisposition())
317 .WillByDefault(Return(initial_disposition)); 317 .WillByDefault(Return(initial_disposition));
318 ON_CALL(*item, GetTargetFilePath()) 318 ON_CALL(*item, GetTargetFilePath())
319 .WillByDefault(ReturnRefOfCopy(base::FilePath())); 319 .WillByDefault(ReturnRefOfCopy(base::FilePath()));
320 ON_CALL(*item, GetTransitionType()) 320 ON_CALL(*item, GetTransitionType())
321 .WillByDefault(Return(content::PAGE_TRANSITION_LINK)); 321 .WillByDefault(Return(ui::PAGE_TRANSITION_LINK));
322 ON_CALL(*item, GetURL()) 322 ON_CALL(*item, GetURL())
323 .WillByDefault(ReturnRefOfCopy(download_url)); 323 .WillByDefault(ReturnRefOfCopy(download_url));
324 ON_CALL(*item, GetUrlChain()) 324 ON_CALL(*item, GetUrlChain())
325 .WillByDefault(ReturnRefOfCopy(url_chain)); 325 .WillByDefault(ReturnRefOfCopy(url_chain));
326 ON_CALL(*item, GetWebContents()) 326 ON_CALL(*item, GetWebContents())
327 .WillByDefault(Return(web_contents())); 327 .WillByDefault(Return(web_contents()));
328 ON_CALL(*item, HasUserGesture()) 328 ON_CALL(*item, HasUserGesture())
329 .WillByDefault(Return(true)); 329 .WillByDefault(Return(true));
330 ON_CALL(*item, IsDangerous()) 330 ON_CALL(*item, IsDangerous())
331 .WillByDefault(Return(false)); 331 .WillByDefault(Return(false));
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 EXPECT_CALL(mock_plugin_filter_, MockPluginAvailable(npapi_plugin.path())) 2179 EXPECT_CALL(mock_plugin_filter_, MockPluginAvailable(npapi_plugin.path()))
2180 .WillRepeatedly(Return(true)); 2180 .WillRepeatedly(Return(true));
2181 2181
2182 target_info = RunDownloadTargetDeterminer( 2182 target_info = RunDownloadTargetDeterminer(
2183 GetPathInDownloadDir(kInitialPath), item.get()); 2183 GetPathInDownloadDir(kInitialPath), item.get());
2184 EXPECT_FALSE(target_info->is_filetype_handled_safely); 2184 EXPECT_FALSE(target_info->is_filetype_handled_safely);
2185 } 2185 }
2186 #endif // defined(ENABLE_PLUGINS) 2186 #endif // defined(ENABLE_PLUGINS)
2187 2187
2188 } // namespace 2188 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/download/download_target_determiner.cc ('k') | chrome/browser/extensions/active_tab_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698