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

Side by Side Diff: cc/trees/remote_channel_unittest.cc

Issue 2008283004: Revert of Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « cc/trees/remote_channel_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "cc/test/begin_frame_args_test.h" 5 #include "cc/test/begin_frame_args_test.h"
6 #include "cc/test/layer_tree_test.h" 6 #include "cc/test/layer_tree_test.h"
7 7
8 namespace cc { 8 namespace cc {
9 9
10 class RemoteChannelTest : public LayerTreeTest { 10 class RemoteChannelTest : public LayerTreeTest {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 }; 130 };
131 131
132 REMOTE_DIRECT_RENDERER_TEST_F(RemoteChannelTestReleaseOutputSurface); 132 REMOTE_DIRECT_RENDERER_TEST_F(RemoteChannelTestReleaseOutputSurface);
133 133
134 class RemoteChannelTestCommit : public RemoteChannelTest { 134 class RemoteChannelTestCommit : public RemoteChannelTest {
135 void BeginChannelTest() override { 135 void BeginChannelTest() override {
136 layer_tree_host()->SetViewportSize(viewport_size_); 136 layer_tree_host()->SetViewportSize(viewport_size_);
137 PostSetNeedsCommitToMainThread(); 137 PostSetNeedsCommitToMainThread();
138 } 138 }
139 139
140 void SetNeedsCommitOnImpl() override { 140 void SetNeedsCommitOnImpl() override { EXPECT_EQ(0, calls_received_++); }
141 calls_received_++;
142 EXPECT_EQ(1, calls_received_);
143 }
144 141
145 void ReceivedBeginMainFrame() override { 142 void ReceivedBeginMainFrame() override { EXPECT_EQ(1, calls_received_++); }
146 calls_received_++;
147 EXPECT_EQ(2, calls_received_);
148 }
149 143
150 void StartCommitOnImpl() override { 144 void StartCommitOnImpl() override { EXPECT_EQ(2, calls_received_++); }
151 calls_received_++;
152 EXPECT_EQ(3, calls_received_);
153 }
154 145
155 void DidCommitAndDrawFrame() override { 146 void DidCommitAndDrawFrame() override { EXPECT_EQ(3, calls_received_++); }
156 calls_received_on_both_server_and_client_++;
157 }
158 147
159 void DidCompleteSwapBuffers() override { 148 void DidCompleteSwapBuffers() override {
160 calls_received_on_both_server_and_client_++; 149 if (++calls_received_on_both_server_and_client_ == 2)
161 if (calls_received_on_both_server_and_client_ == 4)
162 EndTest(); 150 EndTest();
163 } 151 }
164 152
165 void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { 153 void WillCommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
166 // Ensure that we serialized and deserialized the LayerTreeHost for the 154 // Ensure that we serialized and deserialized the LayerTreeHost for the
167 // commit. 155 // commit.
168 EXPECT_EQ(viewport_size_, host_impl->device_viewport_size()); 156 EXPECT_EQ(viewport_size_, host_impl->device_viewport_size());
169 } 157 }
170 158
171 void AfterTest() override { 159 void AfterTest() override {
172 EXPECT_EQ(3, calls_received_); 160 EXPECT_EQ(4, calls_received_);
173 EXPECT_EQ(4, calls_received_on_both_server_and_client_); 161 EXPECT_EQ(2, calls_received_on_both_server_and_client_);
174 } 162 }
175 163
176 const gfx::Size viewport_size_ = gfx::Size(5, 3); 164 const gfx::Size viewport_size_ = gfx::Size(5, 3);
177 }; 165 };
178 166
179 REMOTE_DIRECT_RENDERER_TEST_F(RemoteChannelTestCommit); 167 REMOTE_DIRECT_RENDERER_TEST_F(RemoteChannelTestCommit);
180 168
181 class RemoteChannelTestBeginMainFrameAborted : public RemoteChannelTest { 169 class RemoteChannelTestBeginMainFrameAborted : public RemoteChannelTest {
182 void BeginChannelTest() override { PostSetNeedsCommitToMainThread(); } 170 void BeginChannelTest() override { PostSetNeedsCommitToMainThread(); }
183 171
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 224 }
237 225
238 int output_surface_initialized_count_; 226 int output_surface_initialized_count_;
239 int commit_count_; 227 int commit_count_;
240 }; 228 };
241 229
242 REMOTE_DIRECT_RENDERER_TEST_F( 230 REMOTE_DIRECT_RENDERER_TEST_F(
243 RemoteChannelTestReleaseOutputSurfaceDuringCommit); 231 RemoteChannelTestReleaseOutputSurfaceDuringCommit);
244 232
245 } // namespace cc 233 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/remote_channel_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698