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

Unified Diff: components/update_client/test/crx_downloader_unittest.cc

Issue 808773005: Move most of the component updater artifacts to update_client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/update_client/test/crx_downloader_unittest.cc
diff --git a/components/component_updater/test/crx_downloader_unittest.cc b/components/update_client/test/crx_downloader_unittest.cc
similarity index 95%
rename from components/component_updater/test/crx_downloader_unittest.cc
rename to components/update_client/test/crx_downloader_unittest.cc
index ebc8d6011b66b3f26111fe2770a244139c5e7c14..5b01b42294d56a6d28be90504e5529542cb588ba 100644
--- a/components/component_updater/test/crx_downloader_unittest.cc
+++ b/components/update_client/test/crx_downloader_unittest.cc
@@ -11,7 +11,7 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
-#include "components/component_updater/crx_downloader.h"
+#include "components/update_client/crx_downloader.h"
#include "net/base/net_errors.h"
#include "net/url_request/test_url_request_interceptor.h"
#include "net/url_request/url_request_test_util.h"
@@ -19,7 +19,7 @@
using base::ContentsEqual;
-namespace component_updater {
+namespace update_client {
namespace {
@@ -31,8 +31,11 @@ const char kTestFileName[] = "jebgalgnebhfojomionfpkfelancnnkf.crx";
base::FilePath MakeTestFilePath(const char* file) {
base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
- return path.AppendASCII("components").AppendASCII("test").AppendASCII("data")
- .AppendASCII("component_updater").AppendASCII(file);
+ return path.AppendASCII("components")
+ .AppendASCII("test")
+ .AppendASCII("data")
+ .AppendASCII("update_client")
+ .AppendASCII(file);
}
} // namespace
@@ -112,8 +115,7 @@ void CrxDownloaderTest::SetUp() {
crx_downloader_.reset(CrxDownloader::Create(
false, // Do not use the background downloader in these tests.
- context_.get(),
- base::MessageLoopProxy::current(),
+ context_.get(), base::MessageLoopProxy::current(),
NULL)); // No |background_task_runner| because no background downloader.
crx_downloader_->set_progress_callback(progress_callback_);
@@ -249,8 +251,9 @@ TEST_F(CrxDownloaderTest, OneUrl_InvalidHost) {
get_interceptor_->SetResponse(expected_crx_url, test_file);
crx_downloader_->StartDownloadFromUrl(
- GURL("http://no.such.host"
- "/download/jebgalgnebhfojomionfpkfelancnnkf.crx"),
+ GURL(
+ "http://no.such.host"
+ "/download/jebgalgnebhfojomionfpkfelancnnkf.crx"),
callback_);
RunThreads();
@@ -361,8 +364,9 @@ TEST_F(CrxDownloaderTest, TwoUrls_BothInvalid) {
std::vector<GURL> urls;
urls.push_back(GURL("http://localhost/no/such/file"));
- urls.push_back(GURL("http://no.such.host/"
- "/download/jebgalgnebhfojomionfpkfelancnnkf.crx"));
+ urls.push_back(GURL(
+ "http://no.such.host/"
+ "/download/jebgalgnebhfojomionfpkfelancnnkf.crx"));
crx_downloader_->StartDownload(urls, callback_);
RunThreads();
@@ -375,4 +379,4 @@ TEST_F(CrxDownloaderTest, TwoUrls_BothInvalid) {
EXPECT_TRUE(download_complete_result_.response.empty());
}
-} // namespace component_updater
+} // namespace update_client

Powered by Google App Engine
This is Rietveld 408576698