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

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 823713002: Standardize usage of virtual/override/final specifiers in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 host_->GetResizeParams(&resize_params); 1445 host_->GetResizeParams(&resize_params);
1446 EXPECT_EQ(bounds.size(), resize_params.new_size); 1446 EXPECT_EQ(bounds.size(), resize_params.new_size);
1447 EXPECT_EQ(physical_backing_size, resize_params.physical_backing_size); 1447 EXPECT_EQ(physical_backing_size, resize_params.physical_backing_size);
1448 } 1448 }
1449 1449
1450 class RenderWidgetHostInitialSizeTest : public RenderWidgetHostTest { 1450 class RenderWidgetHostInitialSizeTest : public RenderWidgetHostTest {
1451 public: 1451 public:
1452 RenderWidgetHostInitialSizeTest() 1452 RenderWidgetHostInitialSizeTest()
1453 : RenderWidgetHostTest(), initial_size_(200, 100) {} 1453 : RenderWidgetHostTest(), initial_size_(200, 100) {}
1454 1454
1455 virtual void ConfigureView(TestView* view) override { 1455 void ConfigureView(TestView* view) override {
1456 view->set_bounds(gfx::Rect(initial_size_)); 1456 view->set_bounds(gfx::Rect(initial_size_));
1457 } 1457 }
1458 1458
1459 protected: 1459 protected:
1460 gfx::Size initial_size_; 1460 gfx::Size initial_size_;
1461 }; 1461 };
1462 1462
1463 TEST_F(RenderWidgetHostInitialSizeTest, InitialSize) { 1463 TEST_F(RenderWidgetHostInitialSizeTest, InitialSize) {
1464 // Having an initial size set means that the size information had been sent 1464 // Having an initial size set means that the size information had been sent
1465 // with the reqiest to new up the RenderView and so subsequent WasResized 1465 // with the reqiest to new up the RenderView and so subsequent WasResized
1466 // calls should not result in new IPC (unless the size has actually changed). 1466 // calls should not result in new IPC (unless the size has actually changed).
1467 host_->WasResized(); 1467 host_->WasResized();
1468 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); 1468 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
1469 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); 1469 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size);
1470 EXPECT_TRUE(host_->resize_ack_pending_); 1470 EXPECT_TRUE(host_->resize_ack_pending_);
1471 } 1471 }
1472 1472
1473 } // namespace content 1473 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698