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

Side by Side Diff: ui/views/controls/scroll_view_unittest.cc

Issue 2444563002: cc: Remove "SwapBuffers" naming from LayerTreeHostSingleThreadClient (Closed)
Patch Set: swapsinglethread: fix-name-in-browsertest Created 4 years, 2 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 | « ui/compositor/test/draw_waiter_for_test.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 (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 "ui/views/controls/scroll_view.h" 5 #include "ui/views/controls/scroll_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 private: 208 private:
209 // ui::CompositorObserver: 209 // ui::CompositorObserver:
210 void OnCompositingDidCommit(ui::Compositor* compositor) override { 210 void OnCompositingDidCommit(ui::Compositor* compositor) override {
211 quit_closure_.Run(); 211 quit_closure_.Run();
212 quit_closure_.Reset(); 212 quit_closure_.Reset();
213 } 213 }
214 void OnCompositingStarted(ui::Compositor* compositor, 214 void OnCompositingStarted(ui::Compositor* compositor,
215 base::TimeTicks start_time) override {} 215 base::TimeTicks start_time) override {}
216 void OnCompositingEnded(ui::Compositor* compositor) override {} 216 void OnCompositingEnded(ui::Compositor* compositor) override {}
217 void OnCompositingAborted(ui::Compositor* compositor) override {}
218 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {} 217 void OnCompositingLockStateChanged(ui::Compositor* compositor) override {}
219 void OnCompositingShuttingDown(ui::Compositor* compositor) override {} 218 void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
220 219
221 Widget* widget_ = nullptr; 220 Widget* widget_ = nullptr;
222 221
223 base::Closure quit_closure_; 222 base::Closure quit_closure_;
224 223
225 #if defined(OS_MACOSX) 224 #if defined(OS_MACOSX)
226 std::unique_ptr<ui::test::ScopedPreferredScrollerStyle> scroller_style_; 225 std::unique_ptr<ui::test::ScopedPreferredScrollerStyle> scroller_style_;
227 #endif 226 #endif
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 // Scroll via ScrollView API. Should be reflected on the impl side. 893 // Scroll via ScrollView API. Should be reflected on the impl side.
895 offset.set_y(kDefaultHeight * 4); 894 offset.set_y(kDefaultHeight * 4);
896 scroll_view->contents()->ScrollRectToVisible(offset); 895 scroll_view->contents()->ScrollRectToVisible(offset);
897 EXPECT_EQ(gfx::ScrollOffset(0, offset.y()), test_api.CurrentOffset()); 896 EXPECT_EQ(gfx::ScrollOffset(0, offset.y()), test_api.CurrentOffset());
898 897
899 EXPECT_TRUE(compositor->GetScrollOffsetForLayer(layer_id, &impl_offset)); 898 EXPECT_TRUE(compositor->GetScrollOffsetForLayer(layer_id, &impl_offset));
900 EXPECT_EQ(gfx::ScrollOffset(0, offset.y()), impl_offset); 899 EXPECT_EQ(gfx::ScrollOffset(0, offset.y()), impl_offset);
901 } 900 }
902 901
903 } // namespace views 902 } // namespace views
OLDNEW
« no previous file with comments | « ui/compositor/test/draw_waiter_for_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698