Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(854)

Side by Side Diff: third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp

Issue 2860673002: Change all test cases to use WebViewBase instead of WebViewImpl. (Closed)
Patch Set: Address code review comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698