Index: content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc |
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc |
index a9419b30e6fd02b1797cf8748d1c3c7406002890..240c262454cfa8f784f0dada0c5673494e53ca5c 100644 |
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc |
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc |
@@ -103,7 +103,6 @@ class OverscrollNavigationOverlayTest : public RenderViewHostImplTestHarness { |
overlay_->StartObserving(); |
EXPECT_TRUE(overlay_->web_contents()); |
- EXPECT_FALSE(overlay_->loading_complete_); |
EXPECT_FALSE(overlay_->received_paint_update_); |
} |
@@ -125,10 +124,6 @@ class OverscrollNavigationOverlayTest : public RenderViewHostImplTestHarness { |
TEST_F(OverscrollNavigationOverlayTest, FirstVisuallyNonEmptyPaint_NoImage) { |
ReceivePaintUpdate(); |
EXPECT_TRUE(GetOverlay()->received_paint_update_); |
- EXPECT_FALSE(GetOverlay()->loading_complete_); |
- |
- EXPECT_TRUE(GetOverlay()->received_paint_update_); |
- EXPECT_FALSE(GetOverlay()->loading_complete_); |
// The paint update will hide the overlay. |
EXPECT_FALSE(GetOverlay()->web_contents()); |
} |
@@ -138,7 +133,6 @@ TEST_F(OverscrollNavigationOverlayTest, FirstVisuallyNonEmptyPaint_WithImage) { |
ReceivePaintUpdate(); |
EXPECT_TRUE(GetOverlay()->received_paint_update_); |
- EXPECT_FALSE(GetOverlay()->loading_complete_); |
// The paint update will hide the overlay. |
EXPECT_FALSE(GetOverlay()->web_contents()); |
} |
@@ -149,21 +143,12 @@ TEST_F(OverscrollNavigationOverlayTest, PaintUpdateWithoutNonEmptyPaint) { |
// The page load is complete, but the overlay should still be visible, because |
// there hasn't been any paint update. |
- // This should also send a repaint request to the renderer, so that the |
- // renderer repaints the contents. |
contents()->TestSetIsLoading(false); |
EXPECT_FALSE(GetOverlay()->received_paint_update_); |
- EXPECT_TRUE(GetOverlay()->loading_complete_); |
EXPECT_TRUE(GetOverlay()->web_contents()); |
- EXPECT_TRUE(process()->sink().GetFirstMessageMatching(ViewMsg_Repaint::ID)); |
- |
- // Receive a repaint ack update. This should hide the overlay. |
- ViewHostMsg_UpdateRect_Params params; |
- memset(¶ms, 0, sizeof(params)); |
- params.view_size = gfx::Size(10, 10); |
- params.flags = ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK; |
- ViewHostMsg_UpdateRect rect(test_rvh()->GetRoutingID(), params); |
- RenderViewHostTester::TestOnMessageReceived(test_rvh(), rect); |
+ |
+ // Receive the paint update. This should hide the overlay. |
+ ReceivePaintUpdate(); |
EXPECT_TRUE(GetOverlay()->received_paint_update_); |
EXPECT_FALSE(GetOverlay()->web_contents()); |
} |
@@ -191,34 +176,4 @@ TEST_F(OverscrollNavigationOverlayTest, MultiNavigation_PaintUpdate) { |
EXPECT_FALSE(GetOverlay()->web_contents()); |
} |
-TEST_F(OverscrollNavigationOverlayTest, MultiNavigation_LoadingUpdate) { |
- GetOverlay()->image_delegate_->SetImage(CreateDummyScreenshot()); |
- |
- contents()->TestSetIsLoading(false); |
- EXPECT_TRUE(GetOverlay()->loading_complete_); |
- |
- PerformBackNavigationViaSliderCallbacks(); |
- // No screenshot was set on NavEntry at offset -1. |
- EXPECT_FALSE(GetOverlay()->image_delegate_->has_image()); |
- // Navigation was started, so the loading status flag should be reset. |
- EXPECT_FALSE(GetOverlay()->loading_complete_); |
- |
- // Load updates until the navigation is committed represent updates for the |
- // previous page, so they shouldn't affect the flag. |
- contents()->TestSetIsLoading(true); |
- contents()->TestSetIsLoading(false); |
- EXPECT_FALSE(GetOverlay()->loading_complete_); |
- |
- contents()->CommitPendingNavigation(); |
- contents()->TestSetIsLoading(true); |
- contents()->TestSetIsLoading(false); |
- // Navigation was committed and the load update was received - the flag |
- // should now be updated. |
- EXPECT_TRUE(GetOverlay()->loading_complete_); |
- |
- EXPECT_TRUE(GetOverlay()->web_contents()); |
- ReceivePaintUpdate(); |
- EXPECT_FALSE(GetOverlay()->web_contents()); |
-} |
- |
} // namespace content |