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

Side by Side Diff: ui/chromeos/touch_exploration_controller_unittest.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 | « ui/chromeos/run_all_unittests.cc ('k') | ui/compositor/test/context_factories_for_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/touch_exploration_controller.h" 5 #include "ui/chromeos/touch_exploration_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 class TouchExplorationTest : public aura::test::AuraTestBase { 189 class TouchExplorationTest : public aura::test::AuraTestBase {
190 public: 190 public:
191 TouchExplorationTest() : simulated_clock_(new base::SimpleTestTickClock()) { 191 TouchExplorationTest() : simulated_clock_(new base::SimpleTestTickClock()) {
192 // Tests fail if time is ever 0. 192 // Tests fail if time is ever 0.
193 simulated_clock_->Advance(base::TimeDelta::FromMilliseconds(10)); 193 simulated_clock_->Advance(base::TimeDelta::FromMilliseconds(10));
194 } 194 }
195 ~TouchExplorationTest() override {} 195 ~TouchExplorationTest() override {}
196 196
197 void SetUp() override { 197 void SetUp() override {
198 if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) 198 if (gl::GetGLImplementation() == gl::kGLImplementationNone)
199 gfx::GLSurfaceTestSupport::InitializeOneOff(); 199 gl::GLSurfaceTestSupport::InitializeOneOff();
200 aura::test::AuraTestBase::SetUp(); 200 aura::test::AuraTestBase::SetUp();
201 cursor_client_.reset(new aura::test::TestCursorClient(root_window())); 201 cursor_client_.reset(new aura::test::TestCursorClient(root_window()));
202 root_window()->AddPreTargetHandler(&event_capturer_); 202 root_window()->AddPreTargetHandler(&event_capturer_);
203 generator_.reset(new test::EventGenerator(root_window())); 203 generator_.reset(new test::EventGenerator(root_window()));
204 // The generator takes ownership of the tick clock. 204 // The generator takes ownership of the tick clock.
205 generator_->SetTickClock( 205 generator_->SetTickClock(
206 std::unique_ptr<base::TickClock>(simulated_clock_)); 206 std::unique_ptr<base::TickClock>(simulated_clock_));
207 cursor_client()->ShowCursor(); 207 cursor_client()->ShowCursor();
208 cursor_client()->DisableMouseEvents(); 208 cursor_client()->DisableMouseEvents();
209 } 209 }
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 generator_->PressTouch(); 1890 generator_->PressTouch();
1891 generator_->MoveTouch(initial_press); 1891 generator_->MoveTouch(initial_press);
1892 generator_->MoveTouch(*point); 1892 generator_->MoveTouch(*point);
1893 generator_->ReleaseTouch(); 1893 generator_->ReleaseTouch();
1894 ASSERT_EQ(1U, delegate_.NumExitScreenSounds()); 1894 ASSERT_EQ(1U, delegate_.NumExitScreenSounds());
1895 delegate_.ResetCountersToZero(); 1895 delegate_.ResetCountersToZero();
1896 } 1896 }
1897 } 1897 }
1898 1898
1899 } // namespace ui 1899 } // namespace ui
OLDNEW
« no previous file with comments | « ui/chromeos/run_all_unittests.cc ('k') | ui/compositor/test/context_factories_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698