| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/feedback/feedback_uploader.h" | 5 #include "components/feedback/feedback_uploader.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 const char kReportTwo[] = "two"; | 30 const char kReportTwo[] = "two"; |
| 31 const char kReportThree[] = "three"; | 31 const char kReportThree[] = "three"; |
| 32 const char kReportFour[] = "four"; | 32 const char kReportFour[] = "four"; |
| 33 const char kReportFive[] = "five"; | 33 const char kReportFive[] = "five"; |
| 34 | 34 |
| 35 const base::TimeDelta kRetryDelayForTest = | 35 const base::TimeDelta kRetryDelayForTest = |
| 36 base::TimeDelta::FromMilliseconds(100); | 36 base::TimeDelta::FromMilliseconds(100); |
| 37 | 37 |
| 38 std::unique_ptr<KeyedService> CreateFeedbackUploaderService( | 38 std::unique_ptr<KeyedService> CreateFeedbackUploaderService( |
| 39 content::BrowserContext* context) { | 39 content::BrowserContext* context) { |
| 40 return base::WrapUnique(new feedback::FeedbackUploaderChrome(context)); | 40 return base::MakeUnique<feedback::FeedbackUploaderChrome>(context); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 namespace feedback { | 45 namespace feedback { |
| 46 | 46 |
| 47 class FeedbackUploaderTest : public testing::Test { | 47 class FeedbackUploaderTest : public testing::Test { |
| 48 protected: | 48 protected: |
| 49 FeedbackUploaderTest() | 49 FeedbackUploaderTest() |
| 50 : ui_thread_(content::BrowserThread::UI, &message_loop_), | 50 : ui_thread_(content::BrowserThread::UI, &message_loop_), |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 EXPECT_EQ(dispatched_reports_.size(), 5u); | 162 EXPECT_EQ(dispatched_reports_.size(), 5u); |
| 163 EXPECT_EQ(dispatched_reports_[kReportOne], 1u); | 163 EXPECT_EQ(dispatched_reports_[kReportOne], 1u); |
| 164 EXPECT_EQ(dispatched_reports_[kReportTwo], 2u); | 164 EXPECT_EQ(dispatched_reports_[kReportTwo], 2u); |
| 165 EXPECT_EQ(dispatched_reports_[kReportThree], 2u); | 165 EXPECT_EQ(dispatched_reports_[kReportThree], 2u); |
| 166 EXPECT_EQ(dispatched_reports_[kReportFour], 1u); | 166 EXPECT_EQ(dispatched_reports_[kReportFour], 1u); |
| 167 EXPECT_EQ(dispatched_reports_[kReportFive], 1u); | 167 EXPECT_EQ(dispatched_reports_[kReportFive], 1u); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace feedback | 170 } // namespace feedback |
| OLD | NEW |