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

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

Issue 659093002: Pass the size to the RenderView on creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_enum
Patch Set: fix autoresize for guestview/extensions Created 6 years, 1 month 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 | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.h » ('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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 frame()->OnNavigate(late_nav_params); 2487 frame()->OnNavigate(late_nav_params);
2488 ProcessPendingMessages(); 2488 ProcessPendingMessages();
2489 base::Time after_navigation = 2489 base::Time after_navigation =
2490 base::Time::Now() + base::TimeDelta::FromDays(1); 2490 base::Time::Now() + base::TimeDelta::FromDays(1);
2491 2491
2492 base::Time late_nav_reported_start = 2492 base::Time late_nav_reported_start =
2493 base::Time::FromDoubleT(GetMainFrame()->performance().navigationStart()); 2493 base::Time::FromDoubleT(GetMainFrame()->performance().navigationStart());
2494 EXPECT_LE(late_nav_reported_start, after_navigation); 2494 EXPECT_LE(late_nav_reported_start, after_navigation);
2495 } 2495 }
2496 2496
2497 class RenderViewImplInitialSizeTest : public RenderViewImplTest {
2498 public:
2499 RenderViewImplInitialSizeTest()
2500 : RenderViewImplTest(), initial_size_(200, 100) {}
2501
2502 protected:
2503 virtual scoped_ptr<ViewMsg_Resize_Params> InitialSizeParams() override {
2504 scoped_ptr<ViewMsg_Resize_Params> initial_size_params(
2505 new ViewMsg_Resize_Params());
2506 initial_size_params->new_size = initial_size_;
2507 return initial_size_params.Pass();
2508 }
2509
2510 gfx::Size initial_size_;
2511 };
2512
2513 TEST_F(RenderViewImplInitialSizeTest, InitialSize) {
2514 ASSERT_EQ(initial_size_, view_->GetSize());
2515 ASSERT_EQ(initial_size_, gfx::Size(view_->GetWebView()->size()));
2516 }
2517
2497 } // namespace content 2518 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698