Commit 8969de2a authored by Alex Moshchuk's avatar Alex Moshchuk Committed by Commit Bot

Enforce WARN_UNUSED_RESULT on NavigateToURLAndExpectNoCommit().

Bug: 425335
Change-Id: I4556bb5b1ef2e58b6599746de13b37af22adf5d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830358
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Auto-Submit: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: default avatarŁukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700930}
parent 8f699777
...@@ -751,7 +751,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, ...@@ -751,7 +751,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
RenderProcessHostKillWaiter kill_waiter(frame->GetProcess()); RenderProcessHostKillWaiter kill_waiter(frame->GetProcess());
ScopedInterfaceParamsReplacer replacer(shell()->web_contents(), nullptr); ScopedInterfaceParamsReplacer replacer(shell()->web_contents(), nullptr);
NavigateToURLAndExpectNoCommit(shell(), non_same_document_url); EXPECT_TRUE(NavigateToURLAndExpectNoCommit(shell(), non_same_document_url));
EXPECT_EQ(bad_message::RFH_INTERFACE_PROVIDER_MISSING, kill_waiter.Wait()); EXPECT_EQ(bad_message::RFH_INTERFACE_PROVIDER_MISSING, kill_waiter.Wait());
// Verify that the death of the renderer process doesn't leave behing and leak // Verify that the death of the renderer process doesn't leave behing and leak
......
...@@ -106,7 +106,8 @@ void NavigateToURLBlockUntilNavigationsComplete(Shell* window, ...@@ -106,7 +106,8 @@ void NavigateToURLBlockUntilNavigationsComplete(Shell* window,
// Navigates |window| to |url|, blocks until the navigation finishes, and // Navigates |window| to |url|, blocks until the navigation finishes, and
// checks that the navigation did not commit (e.g., due to a crash or // checks that the navigation did not commit (e.g., due to a crash or
// download). // download).
bool NavigateToURLAndExpectNoCommit(Shell* window, const GURL& url); WARN_UNUSED_RESULT bool NavigateToURLAndExpectNoCommit(Shell* window,
const GURL& url);
// Reloads |window|, blocking until the given number of navigations finishes. // Reloads |window|, blocking until the given number of navigations finishes.
void ReloadBlockUntilNavigationsComplete(Shell* window, void ReloadBlockUntilNavigationsComplete(Shell* window,
......
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