Skip to content

Commit

Permalink
Sync Request.Continue tests (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Apr 6, 2019
1 parent 867677c commit 87fd1df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/PuppeteerSharp.Tests/NetworkTests/RequestContinueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public async Task ShouldAmendPostData()
await e.Request.ContinueAsync(new Payload
{
Method = HttpMethod.Post,
PostData = "FooBar"
PostData = "doggo"
});
};
var requestTask = Server.WaitForRequest("/sleep.zzz", async request =>
Expand All @@ -112,7 +112,7 @@ await Task.WhenAll(
Page.GoToAsync(TestConstants.ServerUrl + "/sleep.zzz")
);

Assert.Equal("FooBar", await requestTask.Result);
Assert.Equal("doggo", await requestTask.Result);
}
}
}
1 change: 1 addition & 0 deletions lib/PuppeteerSharp/Request.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ internal Request(

/// <summary>
/// Continues request with optional request overrides. To use this, request interception should be enabled with <see cref="Page.SetRequestInterceptionAsync(bool)"/>. Exception is immediately thrown if the request interception is not enabled.
/// If the URL is set it won't perform a redirect. The request will be silently forwarded to the new url. For example, the address bar will show the original url.
/// </summary>
/// <param name="overrides">Optional request overwrites.</param>
/// <returns>Task</returns>
Expand Down

0 comments on commit 87fd1df

Please sign in to comment.