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" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 Platform::Current()->GetURLLoaderMockFactory()->SetLoaderDelegate(nullptr); | 163 Platform::Current()->GetURLLoaderMockFactory()->SetLoaderDelegate(nullptr); |
164 | 164 |
165 EXPECT_TRUE(delegate.ServedReentrantly()); | 165 EXPECT_TRUE(delegate.ServedReentrantly()); |
166 | 166 |
167 // delegate is a WebFrameClient and stack-allocated, so manually reset() the | 167 // delegate is a WebFrameClient and stack-allocated, so manually reset() the |
168 // WebViewHelper here. | 168 // WebViewHelper here. |
169 web_view_helper_.Reset(); | 169 web_view_helper_.Reset(); |
170 } | 170 } |
171 | 171 |
172 TEST_F(DocumentLoaderTest, isCommittedButEmpty) { | 172 TEST_F(DocumentLoaderTest, isCommittedButEmpty) { |
173 WebViewImpl* web_view_impl = | 173 WebViewBase* web_view_impl = |
174 web_view_helper_.InitializeAndLoad("about:blank", true); | 174 web_view_helper_.InitializeAndLoad("about:blank", true); |
175 EXPECT_TRUE(ToLocalFrame(web_view_impl->GetPage()->MainFrame()) | 175 EXPECT_TRUE(ToLocalFrame(web_view_impl->GetPage()->MainFrame()) |
176 ->Loader() | 176 ->Loader() |
177 .GetDocumentLoader() | 177 .GetDocumentLoader() |
178 ->IsCommittedButEmpty()); | 178 ->IsCommittedButEmpty()); |
179 } | 179 } |
180 | 180 |
181 } // namespace blink | 181 } // namespace blink |
OLD | NEW |