| Index: Source/web/tests/WebFrameTest.cpp
|
| diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
|
| index 995878ddd6743a00dfa1051fd39e3287e12b7f5a..4b3853d9d01b5c8f15a7c0025afe54cb1418f2de 100644
|
| --- a/Source/web/tests/WebFrameTest.cpp
|
| +++ b/Source/web/tests/WebFrameTest.cpp
|
| @@ -2356,6 +2356,25 @@ TEST_F(WebFrameTest, ReloadWhileProvisional)
|
| webViewHelper.webView()->mainFrame()->dataSource()->request().url());
|
| }
|
|
|
| +TEST_F(WebFrameTest, AppendRedirects)
|
| +{
|
| + const std::string firstURL = "about:blank";
|
| + const std::string secondURL = "http://www.test.com";
|
| +
|
| + FrameTestHelpers::WebViewHelper webViewHelper;
|
| + webViewHelper.initializeAndLoad(firstURL, true);
|
| +
|
| + WebDataSource* dataSource = webViewHelper.webView()->mainFrame()->dataSource();
|
| + ASSERT_TRUE(dataSource);
|
| + dataSource->appendRedirect(toKURL(secondURL));
|
| +
|
| + WebVector<WebURL> redirects;
|
| + dataSource->redirectChain(redirects);
|
| + ASSERT_EQ(2U, redirects.size());
|
| + EXPECT_EQ(toKURL(firstURL), toKURL(redirects[0].spec().data()));
|
| + EXPECT_EQ(toKURL(secondURL), toKURL(redirects[1].spec().data()));
|
| +}
|
| +
|
| TEST_F(WebFrameTest, IframeRedirect)
|
| {
|
| registerMockedHttpURLLoad("iframe_redirect.html");
|
|
|