Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 2133873004: content: Move Surfaces related code out of RWHVA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed overscroll change Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698