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

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

Issue 1319073003: Organize Layout Hooks (content-side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments tweaked. 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
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('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 <vector> 7 #include <vector>
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/browser/frame_host/navigation_entry_impl.h" 9 #include "content/browser/frame_host/navigation_entry_impl.h"
10 #include "content/browser/web_contents/web_contents_view.h" 10 #include "content/browser/web_contents/web_contents_view.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 std::vector<unsigned char> png_data; 91 std::vector<unsigned char> png_data;
92 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data); 92 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data);
93 scoped_refptr<base::RefCountedBytes> png_bytes = 93 scoped_refptr<base::RefCountedBytes> png_bytes =
94 base::RefCountedBytes::TakeVector(&png_data); 94 base::RefCountedBytes::TakeVector(&png_data);
95 NavigationEntryImpl* entry_impl = 95 NavigationEntryImpl* entry_impl =
96 NavigationEntryImpl::FromNavigationEntry(entry); 96 NavigationEntryImpl::FromNavigationEntry(entry);
97 entry_impl->SetScreenshotPNGData(png_bytes); 97 entry_impl->SetScreenshotPNGData(png_bytes);
98 } 98 }
99 99
100 void ReceivePaintUpdate() { 100 void ReceivePaintUpdate() {
101 FrameHostMsg_DidFirstVisuallyNonEmptyPaint msg( 101 ViewHostMsg_DidFirstVisuallyNonEmptyPaint msg(
102 main_test_rfh()->GetRoutingID()); 102 main_test_rfh()->GetRoutingID());
103 RenderViewHostTester::TestOnMessageReceived(test_rvh(), msg); 103 RenderViewHostTester::TestOnMessageReceived(test_rvh(), msg);
104 } 104 }
105 105
106 void PerformBackNavigationViaSliderCallbacks() { 106 void PerformBackNavigationViaSliderCallbacks() {
107 // Sets slide direction to BACK, sets screenshot from NavEntry at 107 // Sets slide direction to BACK, sets screenshot from NavEntry at
108 // offset -1 on layer_delegate_. 108 // offset -1 on layer_delegate_.
109 scoped_ptr<aura::Window> window( 109 scoped_ptr<aura::Window> window(
110 GetOverlay()->CreateBackWindow(GetBackSlideWindowBounds())); 110 GetOverlay()->CreateBackWindow(GetBackSlideWindowBounds()));
111 bool window_created = window; 111 bool window_created = window;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 EXPECT_TRUE(GetOverlay()->window_.get()); 405 EXPECT_TRUE(GetOverlay()->window_.get());
406 406
407 // Load the page. 407 // Load the page.
408 contents()->CommitPendingNavigation(); 408 contents()->CommitPendingNavigation();
409 ReceivePaintUpdate(); 409 ReceivePaintUpdate();
410 EXPECT_FALSE(GetOverlay()->window_.get()); 410 EXPECT_FALSE(GetOverlay()->window_.get());
411 EXPECT_EQ(contents()->GetURL(), first()); 411 EXPECT_EQ(contents()->GetURL(), first());
412 } 412 }
413 413
414 } // namespace content 414 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698