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 "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "content/browser/byte_stream.h" | 10 #include "content/browser/byte_stream.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 using ::testing::_; | 26 using ::testing::_; |
27 using ::testing::NiceMock; | 27 using ::testing::NiceMock; |
28 using ::testing::Property; | 28 using ::testing::Property; |
29 using ::testing::Return; | 29 using ::testing::Return; |
30 using ::testing::SaveArg; | 30 using ::testing::SaveArg; |
31 using ::testing::StrictMock; | 31 using ::testing::StrictMock; |
32 | 32 |
33 namespace { | |
34 | |
35 const int kDownloadChunkSize = 1000; | 33 const int kDownloadChunkSize = 1000; |
36 const int kDownloadSpeed = 1000; | 34 const int kDownloadSpeed = 1000; |
37 const int kDummyDBHandle = 10; | |
38 const base::FilePath::CharType kDummyPath[] = FILE_PATH_LITERAL("/testpath"); | 35 const base::FilePath::CharType kDummyPath[] = FILE_PATH_LITERAL("/testpath"); |
39 | 36 |
40 } // namespace | |
41 | |
42 namespace content { | 37 namespace content { |
43 | 38 |
44 namespace { | 39 namespace { |
45 | 40 |
46 class MockDelegate : public DownloadItemImplDelegate { | 41 class MockDelegate : public DownloadItemImplDelegate { |
47 public: | 42 public: |
48 MockDelegate() : DownloadItemImplDelegate() { | 43 MockDelegate() : DownloadItemImplDelegate() { |
49 SetDefaultExpectations(); | 44 SetDefaultExpectations(); |
50 } | 45 } |
51 | 46 |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 base::Unretained(&returned_path))); | 1262 base::Unretained(&returned_path))); |
1268 RunAllPendingInMessageLoops(); | 1263 RunAllPendingInMessageLoops(); |
1269 EXPECT_TRUE(returned_path.empty()); | 1264 EXPECT_TRUE(returned_path.empty()); |
1270 } | 1265 } |
1271 | 1266 |
1272 TEST(MockDownloadItem, Compiles) { | 1267 TEST(MockDownloadItem, Compiles) { |
1273 MockDownloadItem mock_item; | 1268 MockDownloadItem mock_item; |
1274 } | 1269 } |
1275 | 1270 |
1276 } // namespace content | 1271 } // namespace content |
OLD | NEW |