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 "chrome/browser/safe_browsing/incident_reporting/incident_report_upload
er_impl.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/incident_report_upload
er_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/test/test_simple_task_runner.h" | 10 #include "base/test/test_simple_task_runner.h" |
11 #include "chrome/common/safe_browsing/csd.pb.h" | 11 #include "components/safe_browsing/csd.pb.h" |
12 #include "net/base/load_flags.h" | 12 #include "net/base/load_flags.h" |
13 #include "net/http/http_status_code.h" | 13 #include "net/http/http_status_code.h" |
14 #include "net/url_request/test_url_fetcher_factory.h" | 14 #include "net/url_request/test_url_fetcher_factory.h" |
15 #include "net/url_request/url_request_context_getter.h" | 15 #include "net/url_request/url_request_context_getter.h" |
16 #include "net/url_request/url_request_status.h" | 16 #include "net/url_request/url_request_status.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 class IncidentReportUploaderImplTest : public testing::Test { | 19 class IncidentReportUploaderImplTest : public testing::Test { |
20 public: | 20 public: |
21 // safe_browsing::IncidentReportUploader::OnResultCallback implementation. | 21 // safe_browsing::IncidentReportUploader::OnResultCallback implementation. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 fetcher->delegate()->OnURLFetchComplete(fetcher); | 63 fetcher->delegate()->OnURLFetchComplete(fetcher); |
64 | 64 |
65 EXPECT_EQ(safe_browsing::IncidentReportUploader::UPLOAD_SUCCESS, result_); | 65 EXPECT_EQ(safe_browsing::IncidentReportUploader::UPLOAD_SUCCESS, result_); |
66 EXPECT_TRUE(response_); | 66 EXPECT_TRUE(response_); |
67 } | 67 } |
68 | 68 |
69 // TODO(grt): | 69 // TODO(grt): |
70 // bad status/response code | 70 // bad status/response code |
71 // confirm data in request is in upload test | 71 // confirm data in request is in upload test |
72 // confirm data in response is parsed | 72 // confirm data in response is parsed |
OLD | NEW |