Commit deebbc09 authored by harkness's avatar harkness Committed by Commit bot

Update NotificationImageLoaderTest with better timeout values.

Because of crbug.com/657517 the original submit of the test for
NotificationImageLoader had a very loose timeout value. Now that the bug
was fixed (https://chromiumcodereview.appspot.com/2433323003), this CL
updates the timeout values to be tighter.

BUG=579137

Review-Url: https://codereview.chromium.org/2442323002
Cr-Commit-Position: refs/heads/master@{#427074}
parent e9faa823
...@@ -96,10 +96,7 @@ TEST_F(NotificationImageLoaderTest, TimeoutTest) { ...@@ -96,10 +96,7 @@ TEST_F(NotificationImageLoaderTest, TimeoutTest) {
EXPECT_EQ(LoadState::kNotLoaded, loaded()); EXPECT_EQ(LoadState::kNotLoaded, loaded());
// Now advance time until a timeout should be expected. // Now advance time until a timeout should be expected.
// Note: Because of crbug.com/657517, the platform's time doesn't testingPlatform.runForPeriodSeconds(2);
// actually update unless a task runs, so the platform still thinks it's the
// start time. To trigger a timeout, we have to advance the full time again.
testingPlatform.runForPeriodSeconds(kImageFetchTimeoutInMs / 1000 + 1);
// If the loader times out, it calls the callback and returns an empty bitmap. // If the loader times out, it calls the callback and returns an empty bitmap.
EXPECT_EQ(LoadState::kLoadFailed, loaded()); EXPECT_EQ(LoadState::kLoadFailed, loaded());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment