OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/srt_fetcher_win.h" | 5 #include "chrome/browser/safe_browsing/srt_fetcher_win.h" |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
11 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
17 #include "components/component_updater/pref_names.h" | 18 #include "components/component_updater/pref_names.h" |
18 #include "components/prefs/pref_service.h" | 19 #include "components/prefs/pref_service.h" |
19 #include "content/public/test/test_browser_thread_bundle.h" | 20 #include "content/public/test/test_browser_thread_bundle.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 ExpectToRunAgain(kDaysBetweenSwReporterRunsForPendingPrompt); | 157 ExpectToRunAgain(kDaysBetweenSwReporterRunsForPendingPrompt); |
157 | 158 |
158 local_state->SetBoolean(prefs::kSwReporterPendingPrompt, false); | 159 local_state->SetBoolean(prefs::kSwReporterPendingPrompt, false); |
159 task_runner_->RunPendingTasks(); | 160 task_runner_->RunPendingTasks(); |
160 EXPECT_FALSE(reporter_launched_); | 161 EXPECT_FALSE(reporter_launched_); |
161 base::MessageLoop::current()->RunUntilIdle(); | 162 base::MessageLoop::current()->RunUntilIdle(); |
162 ExpectToRunAgain(kDaysBetweenSuccessfulSwReporterRuns); | 163 ExpectToRunAgain(kDaysBetweenSuccessfulSwReporterRuns); |
163 } | 164 } |
164 | 165 |
165 } // namespace safe_browsing | 166 } // namespace safe_browsing |
OLD | NEW |