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

Side by Side Diff: content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc

Issue 1690633002: Revert of Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « content/browser/site_instance_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/web_contents/aura/overscroll_navigation_overlay.h" 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Tests that an overscroll navigation that receives a loading update actually 300 // Tests that an overscroll navigation that receives a loading update actually
301 // stops observing. 301 // stops observing.
302 TEST_F(OverscrollNavigationOverlayTest, Navigation_LoadingUpdate) { 302 TEST_F(OverscrollNavigationOverlayTest, Navigation_LoadingUpdate) {
303 PerformBackNavigationViaSliderCallbacks(); 303 PerformBackNavigationViaSliderCallbacks();
304 EXPECT_TRUE(GetOverlay()->web_contents()); 304 EXPECT_TRUE(GetOverlay()->web_contents());
305 // DidStopLoading for any navigation should always reset the load flag and 305 // DidStopLoading for any navigation should always reset the load flag and
306 // dismiss the overlay even if the pending navigation wasn't committed - 306 // dismiss the overlay even if the pending navigation wasn't committed -
307 // this is a "safety net" in case we mis-identify the destination webpage 307 // this is a "safety net" in case we mis-identify the destination webpage
308 // (which can happen if a new navigation is performed while while a GestureNav 308 // (which can happen if a new navigation is performed while while a GestureNav
309 // navigation is in progress). 309 // navigation is in progress).
310 contents()->TestSetIsLoading(true);
310 contents()->TestSetIsLoading(false); 311 contents()->TestSetIsLoading(false);
311 EXPECT_FALSE(GetOverlay()->web_contents()); 312 EXPECT_FALSE(GetOverlay()->web_contents());
312 NavigationEntry* pending = contents()->GetController().GetPendingEntry(); 313 NavigationEntry* pending = contents()->GetController().GetPendingEntry();
313 contents()->GetPendingMainFrame()->SendNavigate( 314 contents()->GetPendingMainFrame()->SendNavigate(
314 pending->GetPageID(), pending->GetUniqueID(), false, pending->GetURL()); 315 pending->GetPageID(), pending->GetUniqueID(), false, pending->GetURL());
315 EXPECT_EQ(contents()->GetURL(), third()); 316 EXPECT_EQ(contents()->GetURL(), third());
316 } 317 }
317 318
318 TEST_F(OverscrollNavigationOverlayTest, CloseDuringAnimation) { 319 TEST_F(OverscrollNavigationOverlayTest, CloseDuringAnimation) {
319 ui::ScopedAnimationDurationScaleMode normal_duration_( 320 ui::ScopedAnimationDurationScaleMode normal_duration_(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 EXPECT_TRUE(GetOverlay()->window_.get()); 405 EXPECT_TRUE(GetOverlay()->window_.get());
405 406
406 // Load the page. 407 // Load the page.
407 contents()->CommitPendingNavigation(); 408 contents()->CommitPendingNavigation();
408 ReceivePaintUpdate(); 409 ReceivePaintUpdate();
409 EXPECT_FALSE(GetOverlay()->window_.get()); 410 EXPECT_FALSE(GetOverlay()->window_.get());
410 EXPECT_EQ(contents()->GetURL(), first()); 411 EXPECT_EQ(contents()->GetURL(), first());
411 } 412 }
412 413
413 } // namespace content 414 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_instance_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698