| 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 #if defined(USE_AURA) | 764 #if defined(USE_AURA) |
| 765 view.reset(new RenderWidgetHostViewAura(host_.get())); | 765 view.reset(new RenderWidgetHostViewAura(host_.get())); |
| 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->SetBackgroundColor(SK_ColorTRANSPARENT); |
| 775 EXPECT_FALSE(view->GetBackgroundOpaque()); | 775 EXPECT_FALSE(view->GetBackgroundOpaque()); |
| 776 | 776 |
| 777 const IPC::Message* set_background = | 777 const IPC::Message* set_background = |
| 778 process_->sink().GetUniqueMessageMatching( | 778 process_->sink().GetUniqueMessageMatching( |
| 779 ViewMsg_SetBackgroundOpaque::ID); | 779 ViewMsg_SetBackgroundOpaque::ID); |
| 780 ASSERT_TRUE(set_background); | 780 ASSERT_TRUE(set_background); |
| 781 Tuple1<bool> sent_background; | 781 Tuple1<bool> sent_background; |
| 782 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); | 782 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); |
| 783 EXPECT_FALSE(sent_background.a); | 783 EXPECT_FALSE(sent_background.a); |
| 784 | 784 |
| (...skipping 715 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 |