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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2918943002: Move SetCanHaveScrollbars method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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/renderer/render_view_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 frame()->Navigate(common_params, StartNavigationParams(), request_params); 2187 frame()->Navigate(common_params, StartNavigationParams(), request_params);
2188 2188
2189 FrameHostMsg_DidStartProvisionalLoad::Param host_nav_params = 2189 FrameHostMsg_DidStartProvisionalLoad::Param host_nav_params =
2190 ProcessAndReadIPC<FrameHostMsg_DidStartProvisionalLoad>(); 2190 ProcessAndReadIPC<FrameHostMsg_DidStartProvisionalLoad>();
2191 EXPECT_EQ(std::get<2>(host_nav_params), common_params.navigation_start); 2191 EXPECT_EQ(std::get<2>(host_nav_params), common_params.navigation_start);
2192 } 2192 }
2193 2193
2194 TEST_F(RenderViewImplTest, PreferredSizeZoomed) { 2194 TEST_F(RenderViewImplTest, PreferredSizeZoomed) {
2195 LoadHTML("<body style='margin:0;'><div style='display:inline-block; " 2195 LoadHTML("<body style='margin:0;'><div style='display:inline-block; "
2196 "width:400px; height:400px;'/></body>"); 2196 "width:400px; height:400px;'/></body>");
2197 view()->webview()->MainFrame()->SetCanHaveScrollbars(false); 2197 view()->webview()->MainFrame()->ToWebLocalFrame()->SetCanHaveScrollbars(
2198 false);
2198 EnablePreferredSizeMode(); 2199 EnablePreferredSizeMode();
2199 2200
2200 gfx::Size size = GetPreferredSize(); 2201 gfx::Size size = GetPreferredSize();
2201 EXPECT_EQ(gfx::Size(400, 400), size); 2202 EXPECT_EQ(gfx::Size(400, 400), size);
2202 2203
2203 SetZoomLevel(ZoomFactorToZoomLevel(2.0)); 2204 SetZoomLevel(ZoomFactorToZoomLevel(2.0));
2204 size = GetPreferredSize(); 2205 size = GetPreferredSize();
2205 EXPECT_EQ(gfx::Size(800, 800), size); 2206 EXPECT_EQ(gfx::Size(800, 800), size);
2206 } 2207 }
2207 2208
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 ExpectPauseAndResume(3); 2592 ExpectPauseAndResume(3);
2592 blink::WebScriptSource source2( 2593 blink::WebScriptSource source2(
2593 WebString::FromUTF8("function func2() { func1(); }; func2();")); 2594 WebString::FromUTF8("function func2() { func1(); }; func2();"));
2594 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); 2595 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1);
2595 2596
2596 EXPECT_FALSE(IsPaused()); 2597 EXPECT_FALSE(IsPaused());
2597 Detach(); 2598 Detach();
2598 } 2599 }
2599 2600
2600 } // namespace content 2601 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698