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

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

Issue 9420007: Move RenderWidgetHostView into content namespace. Fix include paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_chromeos_gtk build issue not caught by trybots. Created 8 years, 10 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 | Annotate | Revision Log
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/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "base/timer.h" 8 #include "base/timer.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/renderer_host/backing_store.h" 10 #include "content/browser/renderer_host/backing_store.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 EXPECT_FALSE(host_->resize_ack_pending_); 423 EXPECT_FALSE(host_->resize_ack_pending_);
424 EXPECT_EQ(gfx::Size(), host_->in_flight_size_); 424 EXPECT_EQ(gfx::Size(), host_->in_flight_size_);
425 425
426 // Reset the view so we can exit the test cleanly. 426 // Reset the view so we can exit the test cleanly.
427 host_->SetView(view_.get()); 427 host_->SetView(view_.get());
428 } 428 }
429 429
430 // Tests setting custom background 430 // Tests setting custom background
431 TEST_F(RenderWidgetHostTest, Background) { 431 TEST_F(RenderWidgetHostTest, Background) {
432 #if !defined(OS_MACOSX) 432 #if !defined(OS_MACOSX)
433 scoped_ptr<RenderWidgetHostView> view( 433 scoped_ptr<content::RenderWidgetHostView> view(
434 RenderWidgetHostView::CreateViewForWidget(host_.get())); 434 content::RenderWidgetHostView::CreateViewForWidget(host_.get()));
435 #if defined(USE_AURA) 435 #if defined(USE_AURA)
436 // TODO(derat): Call this on all platforms: http://crbug.com/102450. 436 // TODO(derat): Call this on all platforms: http://crbug.com/102450.
437 static_cast<RenderWidgetHostViewAura*>(view.get())->InitAsChild(NULL); 437 static_cast<RenderWidgetHostViewAura*>(view.get())->InitAsChild(NULL);
438 #endif 438 #endif
439 host_->SetView(view.get()); 439 host_->SetView(view.get());
440 440
441 // Create a checkerboard background to test with. 441 // Create a checkerboard background to test with.
442 gfx::CanvasSkia canvas(gfx::Size(4, 4), true); 442 gfx::CanvasSkia canvas(gfx::Size(4, 4), true);
443 canvas.FillRect(gfx::Rect(0, 0, 2, 2), SK_ColorBLACK); 443 canvas.FillRect(gfx::Rect(0, 0, 2, 2), SK_ColorBLACK);
444 canvas.FillRect(gfx::Rect(2, 0, 2, 2), SK_ColorWHITE); 444 canvas.FillRect(gfx::Rect(2, 0, 2, 2), SK_ColorWHITE);
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); 761 SimulateKeyboardEvent(WebInputEvent::RawKeyDown);
762 SimulateKeyboardEvent(WebInputEvent::RawKeyDown); 762 SimulateKeyboardEvent(WebInputEvent::RawKeyDown);
763 SendInputEventACK(WebInputEvent::RawKeyDown, true); 763 SendInputEventACK(WebInputEvent::RawKeyDown, true);
764 764
765 // Wait long enough for first timeout and see if it fired. 765 // Wait long enough for first timeout and see if it fired.
766 MessageLoop::current()->PostDelayedTask(FROM_HERE, 766 MessageLoop::current()->PostDelayedTask(FROM_HERE,
767 MessageLoop::QuitClosure(), 40); 767 MessageLoop::QuitClosure(), 40);
768 MessageLoop::current()->Run(); 768 MessageLoop::current()->Run();
769 EXPECT_TRUE(host_->unresponsive_timer_fired()); 769 EXPECT_TRUE(host_->unresponsive_timer_fired());
770 } 770 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_mac.cc ('k') | content/browser/renderer_host/render_widget_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698