Commit c00450e6 authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Fix SBER/PasswordProtectionServiceTest.VerifyContentTypeIsPopulated/0

This unit test currently waits for the timeout on network requests
to occur before it verifies the proper request was sent. This CL adds
a fake response so that the test runs quickly.

Bug: 899898
Change-Id: I9e35086647cc80344488abb3319a538e90785eb9
Reviewed-on: https://chromium-review.googlesource.com/c/1316411Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Commit-Queue: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605120}
parent 87687c53
...@@ -1273,6 +1273,12 @@ TEST_P(PasswordProtectionServiceTest, VerifyIsEventLoggingEnabled) { ...@@ -1273,6 +1273,12 @@ TEST_P(PasswordProtectionServiceTest, VerifyIsEventLoggingEnabled) {
} }
TEST_P(PasswordProtectionServiceTest, VerifyContentTypeIsPopulated) { TEST_P(PasswordProtectionServiceTest, VerifyContentTypeIsPopulated) {
LoginReputationClientResponse response =
CreateVerdictProto(LoginReputationClientResponse::SAFE, 10 * kMinute,
GURL(kTargetUrl).host());
test_url_loader_factory_.AddResponse(url_.spec(),
response.SerializeAsString());
content::WebContents* web_contents = GetWebContents(); content::WebContents* web_contents = GetWebContents();
content::WebContentsTester::For(web_contents) content::WebContentsTester::For(web_contents)
......
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