| 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 EXPECT_FALSE(view->GetBackgroundOpaque()); | 874 EXPECT_FALSE(view->GetBackgroundOpaque()); |
| 875 | 875 |
| 876 const IPC::Message* set_background = | 876 const IPC::Message* set_background = |
| 877 process_->sink().GetUniqueMessageMatching( | 877 process_->sink().GetUniqueMessageMatching( |
| 878 ViewMsg_SetBackgroundOpaque::ID); | 878 ViewMsg_SetBackgroundOpaque::ID); |
| 879 ASSERT_TRUE(set_background); | 879 ASSERT_TRUE(set_background); |
| 880 std::tuple<bool> sent_background; | 880 std::tuple<bool> sent_background; |
| 881 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); | 881 ViewMsg_SetBackgroundOpaque::Read(set_background, &sent_background); |
| 882 EXPECT_FALSE(std::get<0>(sent_background)); | 882 EXPECT_FALSE(std::get<0>(sent_background)); |
| 883 | 883 |
| 884 #if defined(USE_AURA) | |
| 885 // See the comment above |InitAsChild(NULL)|. | |
| 886 host_->SetView(NULL); | 884 host_->SetView(NULL); |
| 887 static_cast<RenderWidgetHostViewBase*>(view.release())->Destroy(); | 885 static_cast<RenderWidgetHostViewBase*>(view.release())->Destroy(); |
| 888 #endif | |
| 889 } | 886 } |
| 890 #endif | 887 #endif |
| 891 | 888 |
| 892 // Test that we don't paint when we're hidden, but we still send the ACK. Most | 889 // Test that we don't paint when we're hidden, but we still send the ACK. Most |
| 893 // of the rest of the painting is tested in the GetBackingStore* ones. | 890 // of the rest of the painting is tested in the GetBackingStore* ones. |
| 894 TEST_F(RenderWidgetHostTest, HiddenPaint) { | 891 TEST_F(RenderWidgetHostTest, HiddenPaint) { |
| 895 BrowserThreadImpl ui_thread(BrowserThread::UI, base::MessageLoop::current()); | 892 BrowserThreadImpl ui_thread(BrowserThread::UI, base::MessageLoop::current()); |
| 896 // Hide the widget, it should have sent out a message to the renderer. | 893 // Hide the widget, it should have sent out a message to the renderer. |
| 897 EXPECT_FALSE(host_->is_hidden_); | 894 EXPECT_FALSE(host_->is_hidden_); |
| 898 host_->WasHidden(); | 895 host_->WasHidden(); |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 ui::LatencyInfo()); | 1700 ui::LatencyInfo()); |
| 1704 | 1701 |
| 1705 | 1702 |
| 1706 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). | 1703 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). |
| 1707 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); | 1704 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); |
| 1708 | 1705 |
| 1709 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1706 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
| 1710 } | 1707 } |
| 1711 | 1708 |
| 1712 } // namespace content | 1709 } // namespace content |
| OLD | NEW |