| 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_data.h" | 5 #include "components/feedback/feedback_data.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/prefs/testing_pref_service.h" | |
| 13 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 14 #include "components/feedback/feedback_uploader.h" | 13 #include "components/feedback/feedback_uploader.h" |
| 15 #include "components/feedback/feedback_uploader_factory.h" | 14 #include "components/feedback/feedback_uploader_factory.h" |
| 16 #include "components/keyed_service/core/keyed_service.h" | 15 #include "components/keyed_service/core/keyed_service.h" |
| 16 #include "components/prefs/testing_pref_service.h" |
| 17 #include "components/user_prefs/user_prefs.h" | 17 #include "components/user_prefs/user_prefs.h" |
| 18 #include "content/public/test/test_browser_context.h" | 18 #include "content/public/test/test_browser_context.h" |
| 19 #include "content/public/test/test_browser_thread.h" | 19 #include "content/public/test/test_browser_thread.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const char kHistograms[] = ""; | 25 const char kHistograms[] = ""; |
| 26 const char kImageData[] = ""; | 26 const char kImageData[] = ""; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 TEST_F(FeedbackDataTest, ReportSending) { | 104 TEST_F(FeedbackDataTest, ReportSending) { |
| 105 data_->SetAndCompressHistograms(MakeScoped(kHistograms)); | 105 data_->SetAndCompressHistograms(MakeScoped(kHistograms)); |
| 106 data_->set_image(MakeScoped(kImageData)); | 106 data_->set_image(MakeScoped(kImageData)); |
| 107 data_->AttachAndCompressFileData(MakeScoped(kFileData)); | 107 data_->AttachAndCompressFileData(MakeScoped(kFileData)); |
| 108 Send(); | 108 Send(); |
| 109 RunMessageLoop(); | 109 RunMessageLoop(); |
| 110 EXPECT_TRUE(data_->IsDataComplete()); | 110 EXPECT_TRUE(data_->IsDataComplete()); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace feedback | 113 } // namespace feedback |
| OLD | NEW |