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

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

Issue 1357763002: DocumentLoader::isCommittedButEmpty is timing-dependent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Guess at fixing CQ faliures Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « 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 "config.h" 5 #include "config.h"
6 #include "core/loader/DocumentLoader.h"
6 7
7 #include "platform/testing/URLTestHelpers.h" 8 #include "platform/testing/URLTestHelpers.h"
8 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
9 #include "public/platform/WebURLLoaderClient.h" 10 #include "public/platform/WebURLLoaderClient.h"
10 #include "public/platform/WebUnitTestSupport.h" 11 #include "public/platform/WebUnitTestSupport.h"
11 #include "web/WebLocalFrameImpl.h" 12 #include "web/WebLocalFrameImpl.h"
12 #include "web/tests/FrameTestHelpers.h" 13 #include "web/tests/FrameTestHelpers.h"
13 #include "wtf/TemporaryChange.h" 14 #include "wtf/TemporaryChange.h"
14 #include <gtest/gtest.h> 15 #include <gtest/gtest.h>
15 #include <queue> 16 #include <queue>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 FrameTestHelpers::loadFrame(mainFrame(), "https://example.com/foo.html"); 162 FrameTestHelpers::loadFrame(mainFrame(), "https://example.com/foo.html");
162 Platform::current()->unitTestSupport()->setLoaderDelegate(nullptr); 163 Platform::current()->unitTestSupport()->setLoaderDelegate(nullptr);
163 164
164 EXPECT_TRUE(delegate.servedReentrantly()); 165 EXPECT_TRUE(delegate.servedReentrantly());
165 166
166 // delegate is a WebFrameClient and stack-allocated, so manually reset() the 167 // delegate is a WebFrameClient and stack-allocated, so manually reset() the
167 // WebViewHelper here. 168 // WebViewHelper here.
168 m_webViewHelper.reset(); 169 m_webViewHelper.reset();
169 } 170 }
170 171
172 TEST_F(DocumentLoaderTest, isCommittedButEmpty)
173 {
174 FrameTestHelpers::WebViewHelper webViewHelper;
175 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad("about:blank", tr ue);
176 EXPECT_TRUE(toLocalFrame(toCoreFrame(webViewImpl->mainFrame()))->loader().do cumentLoader()->isCommittedButEmpty());
177 }
178
171 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698