OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/loader/DocumentLoader.h" | 5 #include "core/loader/DocumentLoader.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include "core/page/Page.h" | 8 #include "core/page/Page.h" |
9 #include "platform/testing/URLTestHelpers.h" | 9 #include "platform/testing/URLTestHelpers.h" |
10 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
11 #include "public/platform/Platform.h" | 11 #include "public/platform/Platform.h" |
| 12 #include "public/platform/WebCache.h" |
12 #include "public/platform/WebURLLoaderClient.h" | 13 #include "public/platform/WebURLLoaderClient.h" |
13 #include "public/platform/WebURLLoaderMockFactory.h" | 14 #include "public/platform/WebURLLoaderMockFactory.h" |
14 #include "public/web/WebCache.h" | |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "web/WebLocalFrameImpl.h" | 16 #include "web/WebLocalFrameImpl.h" |
17 #include "web/tests/FrameTestHelpers.h" | 17 #include "web/tests/FrameTestHelpers.h" |
18 #include "wtf/AutoReset.h" | 18 #include "wtf/AutoReset.h" |
19 | 19 |
20 namespace blink { | 20 namespace blink { |
21 | 21 |
22 // TODO(dcheng): Ideally, enough of FrameTestHelpers would be in core/ that | 22 // TODO(dcheng): Ideally, enough of FrameTestHelpers would be in core/ that |
23 // placing a test for a core/ class in web/ wouldn't be necessary. | 23 // placing a test for a core/ class in web/ wouldn't be necessary. |
24 class DocumentLoaderTest : public ::testing::Test { | 24 class DocumentLoaderTest : public ::testing::Test { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 TEST_F(DocumentLoaderTest, isCommittedButEmpty) { | 172 TEST_F(DocumentLoaderTest, isCommittedButEmpty) { |
173 WebViewImpl* webViewImpl = | 173 WebViewImpl* webViewImpl = |
174 m_webViewHelper.initializeAndLoad("about:blank", true); | 174 m_webViewHelper.initializeAndLoad("about:blank", true); |
175 EXPECT_TRUE(toLocalFrame(webViewImpl->page()->mainFrame()) | 175 EXPECT_TRUE(toLocalFrame(webViewImpl->page()->mainFrame()) |
176 ->loader() | 176 ->loader() |
177 .documentLoader() | 177 .documentLoader() |
178 ->isCommittedButEmpty()); | 178 ->isCommittedButEmpty()); |
179 } | 179 } |
180 | 180 |
181 } // namespace blink | 181 } // namespace blink |
OLD | NEW |