| Index: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
|
| index 668a0045422d59985e70709ccdd6ad402927f4a9..61e33fb8e169fcea1fe307f60ef450877af6cbcf 100644
|
| --- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
|
| @@ -853,6 +853,26 @@ TEST_P(ThreadableLoaderTest, ClearInDidFailRedirectCheck)
|
| serveRequests();
|
| }
|
|
|
| +// This test case checks blink doesn't crash even when the response arrives
|
| +// synchronously.
|
| +TEST_P(ThreadableLoaderTest, GetResponseSynchronously)
|
| +{
|
| + InSequence s;
|
| + EXPECT_CALL(checkpoint(), Call(1));
|
| + createLoader(UseAccessControl);
|
| + callCheckpoint(1);
|
| +
|
| + EXPECT_CALL(*client(), didFailAccessControlCheck(_));
|
| + EXPECT_CALL(checkpoint(), Call(2));
|
| +
|
| + // Currently didFailAccessControlCheck is dispatched synchronously. This
|
| + // test is not saying that didFailAccessControlCheck should be dispatched
|
| + // synchronously, but is saying that even when a response is served
|
| + // synchronously it should not lead to a crash.
|
| + startLoader(KURL(KURL(), "about:blank"));
|
| + callCheckpoint(2);
|
| +}
|
| +
|
| } // namespace
|
|
|
| } // namespace blink
|
|
|