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

Side by Side Diff: chrome/browser/plugin_download_helper_unittest.cc

Issue 9303006: Convert use of int ms to TimeDelta in scattered chromium files. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | chrome/common/service_process_util_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/plugin_download_helper.h" 5 #include "chrome/browser/plugin_download_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 download_helper_->InitiateDownload( 66 download_helper_->InitiateDownload(
67 initial_download_path_, 67 initial_download_path_,
68 context_getter, 68 context_getter,
69 base::Bind(&PluginInstallerDownloadTest::OnDownloadCompleted, 69 base::Bind(&PluginInstallerDownloadTest::OnDownloadCompleted,
70 base::Unretained(this)), 70 base::Unretained(this)),
71 base::Bind(&PluginInstallerDownloadTest::OnDownloadError, 71 base::Bind(&PluginInstallerDownloadTest::OnDownloadError,
72 base::Unretained(this))); 72 base::Unretained(this)));
73 73
74 message_loop_.PostDelayedTask( 74 message_loop_.PostDelayedTask(
75 FROM_HERE, MessageLoop::QuitClosure(), 75 FROM_HERE, MessageLoop::QuitClosure(),
76 TestTimeouts::action_max_timeout_ms()); 76 TestTimeouts::action_max_timeout());
77 } 77 }
78 78
79 void OnDownloadCompleted(const FilePath& download_path) { 79 void OnDownloadCompleted(const FilePath& download_path) {
80 success_ = true; 80 success_ = true;
81 final_download_path_ = download_path; 81 final_download_path_ = download_path;
82 message_loop_.Quit(); 82 message_loop_.Quit();
83 download_helper_ = NULL; 83 download_helper_ = NULL;
84 } 84 }
85 85
86 void OnDownloadError(const std::string& error) { 86 void OnDownloadError(const std::string& error) {
(...skipping 26 matching lines...) Expand all
113 // This test validates that the plugin downloader downloads the specified file 113 // This test validates that the plugin downloader downloads the specified file
114 // to a temporary path with the same file name. 114 // to a temporary path with the same file name.
115 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { 115 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) {
116 Start(); 116 Start();
117 MessageLoop::current()->Run(); 117 MessageLoop::current()->Run();
118 118
119 ASSERT_TRUE(success()); 119 ASSERT_TRUE(success());
120 EXPECT_TRUE(initial_download_path().BaseName().value() == 120 EXPECT_TRUE(initial_download_path().BaseName().value() ==
121 final_download_path().BaseName().value()); 121 final_download_path().BaseName().value());
122 } 122 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/service_process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698