| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 | 10 |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 std::unique_ptr<RenderWidgetHostViewBase> view; | 869 std::unique_ptr<RenderWidgetHostViewBase> view; |
| 870 #if defined(USE_AURA) | 870 #if defined(USE_AURA) |
| 871 view.reset(new RenderWidgetHostViewAura(host_.get(), false)); | 871 view.reset(new RenderWidgetHostViewAura(host_.get(), false)); |
| 872 // TODO(derat): Call this on all platforms: http://crbug.com/102450. | 872 // TODO(derat): Call this on all platforms: http://crbug.com/102450. |
| 873 view->InitAsChild(NULL); | 873 view->InitAsChild(NULL); |
| 874 #elif defined(OS_ANDROID) | 874 #elif defined(OS_ANDROID) |
| 875 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); | 875 view.reset(new RenderWidgetHostViewAndroid(host_.get(), NULL)); |
| 876 #endif | 876 #endif |
| 877 host_->SetView(view.get()); | 877 host_->SetView(view.get()); |
| 878 | 878 |
| 879 EXPECT_TRUE(view->GetBackgroundOpaque()); | 879 EXPECT_NE(static_cast<unsigned>(SK_ColorTRANSPARENT), |
| 880 view->background_color()); |
| 880 view->SetBackgroundColor(SK_ColorTRANSPARENT); | 881 view->SetBackgroundColor(SK_ColorTRANSPARENT); |
| 881 EXPECT_FALSE(view->GetBackgroundOpaque()); | 882 EXPECT_EQ(static_cast<unsigned>(SK_ColorTRANSPARENT), |
| 883 view->background_color()); |
| 882 | 884 |
| 883 const IPC::Message* set_background = | 885 const IPC::Message* set_background = |
| 884 process_->sink().GetUniqueMessageMatching( | 886 process_->sink().GetUniqueMessageMatching( |
| 885 ViewMsg_SetBackgroundOpaque::ID); | 887 ViewMsg_SetBackgroundOpaque::ID); |
| 886 ASSERT_TRUE(set_background); | 888 ASSERT_TRUE(set_background); |
| 887 std::tuple<bool> sent_background; | 889 std::tuple<bool> sent_background; |
| 888 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); | 890 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); |
| 889 EXPECT_FALSE(std::get<0>(sent_background)); | 891 EXPECT_FALSE(std::get<0>(sent_background)); |
| 890 | 892 |
| 891 host_->SetView(NULL); | 893 host_->SetView(NULL); |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 ui::LatencyInfo()); | 1734 ui::LatencyInfo()); |
| 1733 | 1735 |
| 1734 | 1736 |
| 1735 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). | 1737 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). |
| 1736 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); | 1738 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); |
| 1737 | 1739 |
| 1738 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1740 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
| 1739 } | 1741 } |
| 1740 | 1742 |
| 1741 } // namespace content | 1743 } // namespace content |
| OLD | NEW |