OLD | NEW |
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // Reset the view so we can exit the test cleanly. | 755 // Reset the view so we can exit the test cleanly. |
756 host_->SetView(view_.get()); | 756 host_->SetView(view_.get()); |
757 } | 757 } |
758 | 758 |
759 // Unable to include render_widget_host_view_mac.h and compile. | 759 // Unable to include render_widget_host_view_mac.h and compile. |
760 #if !defined(OS_MACOSX) | 760 #if !defined(OS_MACOSX) |
761 // Tests setting background transparency. | 761 // Tests setting background transparency. |
762 TEST_F(RenderWidgetHostTest, Background) { | 762 TEST_F(RenderWidgetHostTest, Background) { |
763 scoped_ptr<RenderWidgetHostViewBase> view; | 763 scoped_ptr<RenderWidgetHostViewBase> view; |
764 #if defined(USE_AURA) | 764 #if defined(USE_AURA) |
765 view.reset(new RenderWidgetHostViewAura(host_.get())); | 765 view.reset(new RenderWidgetHostViewAura(host_.get(), false)); |
766 // TODO(derat): Call this on all platforms: http://crbug.com/102450. | 766 // TODO(derat): Call this on all platforms: http://crbug.com/102450. |
767 view->InitAsChild(NULL); | 767 view->InitAsChild(NULL); |
768 #elif defined(OS_ANDROID) | 768 #elif defined(OS_ANDROID) |
769 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); | 769 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); |
770 #endif | 770 #endif |
771 host_->SetView(view.get()); | 771 host_->SetView(view.get()); |
772 | 772 |
773 EXPECT_TRUE(view->GetBackgroundOpaque()); | 773 EXPECT_TRUE(view->GetBackgroundOpaque()); |
774 view->SetBackgroundOpaque(false); | 774 view->SetBackgroundOpaque(false); |
775 EXPECT_FALSE(view->GetBackgroundOpaque()); | 775 EXPECT_FALSE(view->GetBackgroundOpaque()); |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 | 1500 |
1501 ASSERT_TRUE(host_->is_hidden()); | 1501 ASSERT_TRUE(host_->is_hidden()); |
1502 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); | 1502 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); |
1503 ASSERT_FALSE(host_->is_hidden()); | 1503 ASSERT_FALSE(host_->is_hidden()); |
1504 | 1504 |
1505 // Make sure the input router is in a fresh state. | 1505 // Make sure the input router is in a fresh state. |
1506 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1506 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
1507 } | 1507 } |
1508 | 1508 |
1509 } // namespace content | 1509 } // namespace content |
OLD | NEW |