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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 #if defined(USE_AURA) | 753 #if defined(USE_AURA) |
754 view.reset(new RenderWidgetHostViewAura(host_.get(), false)); | 754 view.reset(new RenderWidgetHostViewAura(host_.get(), false)); |
755 // TODO(derat): Call this on all platforms: http://crbug.com/102450. | 755 // TODO(derat): Call this on all platforms: http://crbug.com/102450. |
756 view->InitAsChild(NULL); | 756 view->InitAsChild(NULL); |
757 #elif defined(OS_ANDROID) | 757 #elif defined(OS_ANDROID) |
758 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); | 758 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); |
759 #endif | 759 #endif |
760 host_->SetView(view.get()); | 760 host_->SetView(view.get()); |
761 | 761 |
762 EXPECT_TRUE(view->GetBackgroundOpaque()); | 762 EXPECT_TRUE(view->GetBackgroundOpaque()); |
763 view->SetBackgroundOpaque(false); | 763 view->SetBackgroundColor(SK_ColorTRANSPARENT); |
764 EXPECT_FALSE(view->GetBackgroundOpaque()); | 764 EXPECT_FALSE(view->GetBackgroundOpaque()); |
765 | 765 |
766 const IPC::Message* set_background = | 766 const IPC::Message* set_background = |
767 process_->sink().GetUniqueMessageMatching( | 767 process_->sink().GetUniqueMessageMatching( |
768 ViewMsg_SetBackgroundOpaque::ID); | 768 ViewMsg_SetBackgroundOpaque::ID); |
769 ASSERT_TRUE(set_background); | 769 ASSERT_TRUE(set_background); |
770 Tuple1<bool> sent_background; | 770 Tuple1<bool> sent_background; |
771 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); | 771 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); |
772 EXPECT_FALSE(sent_background.a); | 772 EXPECT_FALSE(sent_background.a); |
773 | 773 |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1489 | 1489 |
1490 ASSERT_TRUE(host_->is_hidden()); | 1490 ASSERT_TRUE(host_->is_hidden()); |
1491 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); | 1491 host_->RendererExited(base::TERMINATION_STATUS_PROCESS_CRASHED, -1); |
1492 ASSERT_FALSE(host_->is_hidden()); | 1492 ASSERT_FALSE(host_->is_hidden()); |
1493 | 1493 |
1494 // Make sure the input router is in a fresh state. | 1494 // Make sure the input router is in a fresh state. |
1495 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1495 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
1496 } | 1496 } |
1497 | 1497 |
1498 } // namespace content | 1498 } // namespace content |
OLD | NEW |