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

Side by Side Diff: chrome/browser/net/file_downloader_unittest.cc

Issue 2695823008: Add missing #include around sequenced_worker_pool.h in //chrome (Closed)
Patch Set: sync_websocket_impl & wizard_controller Created 3 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 | « chrome/browser/net/file_downloader.cc ('k') | chrome/browser/net/url_request_mock_util.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/net/file_downloader.h"
6
5 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
6 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/threading/sequenced_worker_pool.h"
10 #include "base/threading/thread_task_runner_handle.h" 13 #include "base/threading/thread_task_runner_handle.h"
11 #include "chrome/browser/net/file_downloader.h"
12 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
13 #include "net/url_request/test_url_fetcher_factory.h" 15 #include "net/url_request/test_url_fetcher_factory.h"
14 #include "net/url_request/url_request_test_util.h" 16 #include "net/url_request/url_request_test_util.h"
15 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
17 #include "url/gurl.h" 19 #include "url/gurl.h"
18 20
19 const char kURL[] = "https://www.url.com/path"; 21 const char kURL[] = "https://www.url.com/path";
20 const char kFilename[] = "filename.ext"; 22 const char kFilename[] = "filename.ext";
21 const char kFileContents1[] = "file contents"; 23 const char kFileContents1[] = "file contents";
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ASSERT_TRUE(base::ReadFileToString(path(), &contents)); 123 ASSERT_TRUE(base::ReadFileToString(path(), &contents));
122 EXPECT_EQ(std::string(kFileContents1), contents); 124 EXPECT_EQ(std::string(kFileContents1), contents);
123 125
124 SetValidResponse2(); 126 SetValidResponse2();
125 Download(false, FileDownloader::EXISTS); 127 Download(false, FileDownloader::EXISTS);
126 // The file should still have the old contents. 128 // The file should still have the old contents.
127 EXPECT_TRUE(base::PathExists(path())); 129 EXPECT_TRUE(base::PathExists(path()));
128 ASSERT_TRUE(base::ReadFileToString(path(), &contents)); 130 ASSERT_TRUE(base::ReadFileToString(path(), &contents));
129 EXPECT_EQ(std::string(kFileContents1), contents); 131 EXPECT_EQ(std::string(kFileContents1), contents);
130 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/net/file_downloader.cc ('k') | chrome/browser/net/url_request_mock_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698