OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browsing_data_ui/history_notice_utils.h" | 5 #include "components/browsing_data_ui/history_notice_utils.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "components/history/core/test/fake_web_history_service.h" | 12 #include "components/history/core/test/fake_web_history_service.h" |
13 #include "components/signin/core/browser/account_tracker_service.h" | 13 #include "components/signin/core/browser/account_tracker_service.h" |
14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
15 #include "components/signin/core/browser/fake_signin_manager.h" | 15 #include "components/signin/core/browser/fake_signin_manager.h" |
16 #include "components/signin/core/browser/test_signin_client.h" | 16 #include "components/signin/core/browser/test_signin_client.h" |
| 17 #include "components/sync/base/model_type.h" |
17 #include "components/sync_driver/fake_sync_service.h" | 18 #include "components/sync_driver/fake_sync_service.h" |
18 #include "components/version_info/version_info.h" | 19 #include "components/version_info/version_info.h" |
19 #include "net/http/http_status_code.h" | 20 #include "net/http/http_status_code.h" |
20 #include "net/url_request/url_request_test_util.h" | 21 #include "net/url_request/url_request_test_util.h" |
21 #include "sync/internal_api/public/base/model_type.h" | |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace browsing_data_ui { | 24 namespace browsing_data_ui { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 class TestSyncService : public sync_driver::FakeSyncService { | 28 class TestSyncService : public sync_driver::FakeSyncService { |
29 public: | 29 public: |
30 // Getters (FakeSyncService implementation). --------------------------------- | 30 // Getters (FakeSyncService implementation). --------------------------------- |
31 bool IsSyncActive() const override { | 31 bool IsSyncActive() const override { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Invalid responses from the web history are interpreted as false. | 178 // Invalid responses from the web history are interpreted as false. |
179 history_service()->SetWebAndAppActivityEnabled(true); | 179 history_service()->SetWebAndAppActivityEnabled(true); |
180 history_service()->SetOtherFormsOfBrowsingHistoryPresent(true); | 180 history_service()->SetOtherFormsOfBrowsingHistoryPresent(true); |
181 history_service()->SetupFakeResponse(true, net::HTTP_INTERNAL_SERVER_ERROR); | 181 history_service()->SetupFakeResponse(true, net::HTTP_INTERNAL_SERVER_ERROR); |
182 ExpectShouldPopupDialogAboutOtherFormsOfBrowsingHistoryWithResult(false); | 182 ExpectShouldPopupDialogAboutOtherFormsOfBrowsingHistoryWithResult(false); |
183 history_service()->SetupFakeResponse(false, net::HTTP_OK); | 183 history_service()->SetupFakeResponse(false, net::HTTP_OK); |
184 ExpectShouldPopupDialogAboutOtherFormsOfBrowsingHistoryWithResult(false); | 184 ExpectShouldPopupDialogAboutOtherFormsOfBrowsingHistoryWithResult(false); |
185 } | 185 } |
186 | 186 |
187 } // namespace browsing_data_ui | 187 } // namespace browsing_data_ui |
OLD | NEW |