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

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

Issue 1364863002: DocumentLoader::isCommittedButEmpty is timing-dependent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Emulate onPageFinished Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
6
7 #include "core/page/Page.h"
5 #include "platform/testing/URLTestHelpers.h" 8 #include "platform/testing/URLTestHelpers.h"
6 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
7 #include "public/platform/WebURLLoaderClient.h" 10 #include "public/platform/WebURLLoaderClient.h"
8 #include "public/platform/WebURLLoaderMockFactory.h" 11 #include "public/platform/WebURLLoaderMockFactory.h"
9 #include "public/web/WebCache.h" 12 #include "public/web/WebCache.h"
10 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
11 #include "web/WebLocalFrameImpl.h" 14 #include "web/WebLocalFrameImpl.h"
12 #include "web/tests/FrameTestHelpers.h" 15 #include "web/tests/FrameTestHelpers.h"
13 #include "wtf/AutoReset.h" 16 #include "wtf/AutoReset.h"
14 #include <queue> 17 #include <queue>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 FrameTestHelpers::loadFrame(mainFrame(), "https://example.com/foo.html"); 163 FrameTestHelpers::loadFrame(mainFrame(), "https://example.com/foo.html");
161 Platform::current()->getURLLoaderMockFactory()->setLoaderDelegate(nullptr); 164 Platform::current()->getURLLoaderMockFactory()->setLoaderDelegate(nullptr);
162 165
163 EXPECT_TRUE(delegate.servedReentrantly()); 166 EXPECT_TRUE(delegate.servedReentrantly());
164 167
165 // delegate is a WebFrameClient and stack-allocated, so manually reset() the 168 // delegate is a WebFrameClient and stack-allocated, so manually reset() the
166 // WebViewHelper here. 169 // WebViewHelper here.
167 m_webViewHelper.reset(); 170 m_webViewHelper.reset();
168 } 171 }
169 172
173 TEST_F(DocumentLoaderTest, isCommittedButEmpty)
174 {
175 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad("about:blank", true);
176 EXPECT_TRUE(toLocalFrame(webViewImpl->page()->mainFrame())->loader().documen tLoader()->isCommittedButEmpty());
177 }
178
170 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698