| 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 <initializer_list> | 7 #include <initializer_list> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 IN_PROC_BROWSER_TEST_F(SRTFetcherTest, RanRecently) { | 298 IN_PROC_BROWSER_TEST_F(SRTFetcherTest, RanRecently) { |
| 299 constexpr int kDaysLeft = 1; | 299 constexpr int kDaysLeft = 1; |
| 300 SetDaysSinceLastTriggered(kDaysBetweenSuccessfulSwReporterRuns - kDaysLeft); | 300 SetDaysSinceLastTriggered(kDaysBetweenSuccessfulSwReporterRuns - kDaysLeft); |
| 301 RunReporter(kSwReporterNothingFound); | 301 RunReporter(kSwReporterNothingFound); |
| 302 ExpectReporterLaunches(0, 0, false); | 302 ExpectReporterLaunches(0, 0, false); |
| 303 ExpectToRunAgain(kDaysLeft); | 303 ExpectToRunAgain(kDaysLeft); |
| 304 ExpectReporterLaunches(kDaysLeft, 1, false); | 304 ExpectReporterLaunches(kDaysLeft, 1, false); |
| 305 ExpectToRunAgain(kDaysBetweenSuccessfulSwReporterRuns); | 305 ExpectToRunAgain(kDaysBetweenSuccessfulSwReporterRuns); |
| 306 } | 306 } |
| 307 | 307 |
| 308 IN_PROC_BROWSER_TEST_F(SRTFetcherTest, WaitForBrowser) { | 308 // Test is flaky. crbug.com/705608 |
| 309 IN_PROC_BROWSER_TEST_F(SRTFetcherTest, DISABLED_WaitForBrowser) { |
| 309 Profile* profile = browser()->profile(); | 310 Profile* profile = browser()->profile(); |
| 310 | 311 |
| 311 // Ensure that even though we're closing the last browser, we don't enter the | 312 // Ensure that even though we're closing the last browser, we don't enter the |
| 312 // "shutting down" state, which will prevent the test from starting another | 313 // "shutting down" state, which will prevent the test from starting another |
| 313 // browser. | 314 // browser. |
| 314 ScopedKeepAlive test_keep_alive(KeepAliveOrigin::SESSION_RESTORE, | 315 ScopedKeepAlive test_keep_alive(KeepAliveOrigin::SESSION_RESTORE, |
| 315 KeepAliveRestartOption::ENABLED); | 316 KeepAliveRestartOption::ENABLED); |
| 316 | 317 |
| 317 // Use the standard task runner for browser cleanup, which will wait forever | 318 // Use the standard task runner for browser cleanup, which will wait forever |
| 318 // with the mock clock. | 319 // with the mock clock. |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 // testing framework. | 599 // testing framework. |
| 599 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorNoFile) { | 600 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorNoFile) { |
| 600 RunDialog(); | 601 RunDialog(); |
| 601 } | 602 } |
| 602 | 603 |
| 603 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorFile) { | 604 IN_PROC_BROWSER_TEST_F(SRTFetcherPromptTest, InvokeDialog_SRTErrorFile) { |
| 604 RunDialog(); | 605 RunDialog(); |
| 605 } | 606 } |
| 606 | 607 |
| 607 } // namespace safe_browsing | 608 } // namespace safe_browsing |
| OLD | NEW |