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

Side by Side Diff: ui/aura/test/env_test_helper.h

Issue 2759463002: aura-mus: create an interactive ui test for drag and drop. (Closed)
Patch Set: Merge with master Created 3 years, 9 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/aura/mus/window_tree_client.cc ('k') | ui/views/mus/BUILD.gn » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_AURA_TEST_ENV_TEST_HELPER_H_ 5 #ifndef UI_AURA_TEST_ENV_TEST_HELPER_H_
6 #define UI_AURA_TEST_ENV_TEST_HELPER_H_ 6 #define UI_AURA_TEST_ENV_TEST_HELPER_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 void SetInputStateLookup( 23 void SetInputStateLookup(
24 std::unique_ptr<InputStateLookup> input_state_lookup) { 24 std::unique_ptr<InputStateLookup> input_state_lookup) {
25 env_->input_state_lookup_ = std::move(input_state_lookup); 25 env_->input_state_lookup_ = std::move(input_state_lookup);
26 } 26 }
27 27
28 void ResetEventState() { 28 void ResetEventState() {
29 env_->mouse_button_flags_ = 0; 29 env_->mouse_button_flags_ = 0;
30 env_->is_touch_down_ = false; 30 env_->is_touch_down_ = false;
31 } 31 }
32 32
33 void SetMode(Env::Mode mode) { env_->mode_ = mode; } 33 void SetMode(Env::Mode mode) {
34 env_->mode_ = mode;
35 if (mode == Env::Mode::MUS)
36 env_->EnableMusOSExchangeDataProvider();
37 }
34 38
35 WindowTreeClient* GetWindowTreeClient() { return env_->window_tree_client_; } 39 WindowTreeClient* GetWindowTreeClient() { return env_->window_tree_client_; }
36 40
37 // This circumvents the DCHECKs in Env::SetWindowTreeClient() and should 41 // This circumvents the DCHECKs in Env::SetWindowTreeClient() and should
38 // only be used for tests where Env is long lived. 42 // only be used for tests where Env is long lived.
39 void SetWindowTreeClient(WindowTreeClient* window_tree_client) { 43 void SetWindowTreeClient(WindowTreeClient* window_tree_client) {
40 env_->window_tree_client_ = window_tree_client; 44 env_->window_tree_client_ = window_tree_client;
41 } 45 }
42 46
43 void SetAlwaysUseLastMouseLocation(bool value) { 47 void SetAlwaysUseLastMouseLocation(bool value) {
44 env_->always_use_last_mouse_location_ = value; 48 env_->always_use_last_mouse_location_ = value;
45 } 49 }
46 50
47 private: 51 private:
48 Env* env_; 52 Env* env_;
49 53
50 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper); 54 DISALLOW_COPY_AND_ASSIGN(EnvTestHelper);
51 }; 55 };
52 56
53 } // namespace test 57 } // namespace test
54 } // namespace aura 58 } // namespace aura
55 59
56 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_ 60 #endif // UI_AURA_TEST_ENV_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/views/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698