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

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

Issue 266053003: Remove page IDs from three WebContentsObserver APIs that don't need it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Avi's change Created 6 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 | Annotate | Revision Log
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 "content/browser/frame_host/navigation_entry_impl.h" 7 #include "content/browser/frame_host/navigation_entry_impl.h"
8 #include "content/browser/web_contents/aura/image_window_delegate.h" 8 #include "content/browser/web_contents/aura/image_window_delegate.h"
9 #include "content/browser/web_contents/web_contents_view.h" 9 #include "content/browser/web_contents/web_contents_view.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 27 matching lines...) Expand all
38 std::vector<unsigned char> png_data; 38 std::vector<unsigned char> png_data;
39 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data); 39 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data);
40 scoped_refptr<base::RefCountedBytes> png_bytes = 40 scoped_refptr<base::RefCountedBytes> png_bytes =
41 base::RefCountedBytes::TakeVector(&png_data); 41 base::RefCountedBytes::TakeVector(&png_data);
42 NavigationEntryImpl* entry_impl = 42 NavigationEntryImpl* entry_impl =
43 NavigationEntryImpl::FromNavigationEntry(entry); 43 NavigationEntryImpl::FromNavigationEntry(entry);
44 entry_impl->SetScreenshotPNGData(png_bytes); 44 entry_impl->SetScreenshotPNGData(png_bytes);
45 } 45 }
46 46
47 void ReceivePaintUpdate() { 47 void ReceivePaintUpdate() {
48 ViewHostMsg_DidFirstVisuallyNonEmptyPaint msg( 48 ViewHostMsg_DidFirstVisuallyNonEmptyPaint msg(test_rvh()->GetRoutingID());
49 test_rvh()->GetRoutingID(), 0);
50 RenderViewHostTester::TestOnMessageReceived(test_rvh(), msg); 49 RenderViewHostTester::TestOnMessageReceived(test_rvh(), msg);
51 } 50 }
52 51
53 void PerformBackNavigationViaSliderCallbacks() { 52 void PerformBackNavigationViaSliderCallbacks() {
54 // Sets slide direction to SLIDE_BACK, sets screenshot from NavEntry at 53 // Sets slide direction to SLIDE_BACK, sets screenshot from NavEntry at
55 // offset -1 on layer_delegate_. 54 // offset -1 on layer_delegate_.
56 delete GetOverlay()->CreateBackLayer(); 55 delete GetOverlay()->CreateBackLayer();
57 // Performs BACK navigation, sets image from layer_delegate_ on 56 // Performs BACK navigation, sets image from layer_delegate_ on
58 // image_delegate_. 57 // image_delegate_.
59 GetOverlay()->OnWindowSlideCompleting(); 58 GetOverlay()->OnWindowSlideCompleting();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Navigation was committed and the load update was received - the flag 215 // Navigation was committed and the load update was received - the flag
217 // should now be updated. 216 // should now be updated.
218 EXPECT_TRUE(GetOverlay()->loading_complete_); 217 EXPECT_TRUE(GetOverlay()->loading_complete_);
219 218
220 EXPECT_TRUE(GetOverlay()->web_contents()); 219 EXPECT_TRUE(GetOverlay()->web_contents());
221 ReceivePaintUpdate(); 220 ReceivePaintUpdate();
222 EXPECT_FALSE(GetOverlay()->web_contents()); 221 EXPECT_FALSE(GetOverlay()->web_contents());
223 } 222 }
224 223
225 } // namespace content 224 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698