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

Side by Side Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 23461020: Disabled GetSizeForNewRenderView test as this test fails when forced in compositing mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed gab's comment and fixed experimental modification. Created 7 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/values.h" 5 #include "base/values.h"
6 #include "content/browser/renderer_host/render_view_host_impl.h" 6 #include "content/browser/renderer_host/render_view_host_impl.h"
7 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/browser/load_notification_details.h" 8 #include "content/public/browser/load_notification_details.h"
9 #include "content/public/browser/navigation_controller.h" 9 #include "content/public/browser/navigation_controller.h"
10 #include "content/public/browser/notification_details.h" 10 #include "content/public/browser/notification_details.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html")); 220 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"));
221 221
222 root = wc->GetFrameTreeRootForTesting(); 222 root = wc->GetFrameTreeRootForTesting();
223 EXPECT_EQ(0UL, root->child_count()); 223 EXPECT_EQ(0UL, root->child_count());
224 EXPECT_EQ(std::string(), root->frame_name()); 224 EXPECT_EQ(std::string(), root->frame_name());
225 EXPECT_EQ(rvh->main_frame_id(), root->frame_id()); 225 EXPECT_EQ(rvh->main_frame_id(), root->frame_id());
226 } 226 }
227 227
228 // TODO(sail): enable this for MAC when auto resizing of WebContentsViewCocoa is 228 // TODO(sail): enable this for MAC when auto resizing of WebContentsViewCocoa is
229 // fixed. 229 // fixed.
230 #if defined(OS_MACOSX) || defined(OS_ANDROID) 230 // TODO(shrikant): enable this for Windows when issue with
231 // force-compositing-mode is resolved (http://crbug.com/281726).
232 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
231 #define MAYBE_GetSizeForNewRenderView DISABLED_GetSizeForNewRenderView 233 #define MAYBE_GetSizeForNewRenderView DISABLED_GetSizeForNewRenderView
232 #else 234 #else
233 #define MAYBE_GetSizeForNewRenderView GetSizeForNewRenderView 235 #define MAYBE_GetSizeForNewRenderView GetSizeForNewRenderView
234 #endif 236 #endif
235 // Test that RenderViewHost is created and updated at the size specified by 237 // Test that RenderViewHost is created and updated at the size specified by
236 // WebContentsDelegate::GetSizeForNewRenderView(). 238 // WebContentsDelegate::GetSizeForNewRenderView().
237 IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, 239 IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
238 MAYBE_GetSizeForNewRenderView) { 240 MAYBE_GetSizeForNewRenderView) {
239 scoped_ptr<RenderViewSizeDelegate> delegate(new RenderViewSizeDelegate()); 241 scoped_ptr<RenderViewSizeDelegate> delegate(new RenderViewSizeDelegate());
240 shell()->web_contents()->SetDelegate(delegate.get()); 242 shell()->web_contents()->SetDelegate(delegate.get());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // RenderViewSizeObserver resizes WebContentsView in NavigateToPendingEntry, 278 // RenderViewSizeObserver resizes WebContentsView in NavigateToPendingEntry,
277 // so both WebContentsView and RenderWidgetHostView adopt this new size. 279 // so both WebContentsView and RenderWidgetHostView adopt this new size.
278 new_size.Enlarge(size_insets.width(), size_insets.height()); 280 new_size.Enlarge(size_insets.width(), size_insets.height());
279 EXPECT_EQ(new_size, 281 EXPECT_EQ(new_size,
280 shell()->web_contents()->GetRenderWidgetHostView()->GetViewBounds(). 282 shell()->web_contents()->GetRenderWidgetHostView()->GetViewBounds().
281 size()); 283 size());
282 EXPECT_EQ(new_size, shell()->web_contents()->GetView()->GetContainerSize()); 284 EXPECT_EQ(new_size, shell()->web_contents()->GetView()->GetContainerSize());
283 } 285 }
284 286
285 } // namespace content 287 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698