Chromium Code Reviews| Index: content/child/web_url_loader_impl_unittest.cc |
| diff --git a/content/child/web_url_loader_impl_unittest.cc b/content/child/web_url_loader_impl_unittest.cc |
| index e44a000797ed81a2a40f48445e7124e61c2db6dc..410d13a6d1ffdc587582ddd1190fdd4d14628f6a 100644 |
| --- a/content/child/web_url_loader_impl_unittest.cc |
| +++ b/content/child/web_url_loader_impl_unittest.cc |
| @@ -507,7 +507,7 @@ TEST_F(WebURLLoaderImplTest, DataURLDeleteOnReceiveData) { |
| EXPECT_FALSE(bridge()); |
| } |
| -TEST_F(WebURLLoaderImplTest, DataURLDeleteOnFinisha) { |
| +TEST_F(WebURLLoaderImplTest, DataURLDeleteOnFinish) { |
| blink::WebURLRequest request; |
| request.initialize(); |
| request.setURL(GURL("data:text/html;charset=utf-8,blah!")); |
| @@ -520,6 +520,27 @@ TEST_F(WebURLLoaderImplTest, DataURLDeleteOnFinisha) { |
| EXPECT_FALSE(bridge()); |
| } |
| +TEST_F(WebURLLoaderImplTest, DataURLDefersLoading) { |
| + blink::WebURLRequest request; |
| + request.initialize(); |
| + request.setURL(GURL("data:text/html;charset=utf-8,blah!")); |
| + client()->loader()->loadAsynchronously(request, client()); |
| + |
| + client()->loader()->setDefersLoading(true); |
| + message_loop()->RunUntilIdle(); |
| + EXPECT_FALSE(client()->did_finish()); |
| + message_loop()->RunUntilIdle(); |
| + EXPECT_FALSE(client()->did_finish()); |
|
davidben
2014/11/21 18:34:00
Why do this twice? I would have thought that a Run
|
| + |
| + client()->loader()->setDefersLoading(false); |
| + message_loop()->RunUntilIdle(); |
| + EXPECT_TRUE(client()->did_finish()); |
| + |
| + EXPECT_EQ("blah!", client()->received_data()); |
| + EXPECT_EQ(net::OK, client()->error().reason); |
| + EXPECT_EQ("", client()->error().domain.utf8()); |
| +} |
| + |
| // FTP integration tests. These are focused more on safe deletion than correct |
| // parsing of FTP responses. |