OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/renderer_host/input/touch_selection_controller_client_
aura.h" | 5 #include "content/browser/renderer_host/input/touch_selection_controller_client_
aura.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 12 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
13 #include "content/browser/web_contents/web_contents_impl.h" | 13 #include "content/browser/web_contents/web_contents_impl.h" |
14 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
15 #include "content/public/test/content_browser_test.h" | 15 #include "content/public/test/content_browser_test.h" |
16 #include "content/public/test/content_browser_test_utils.h" | 16 #include "content/public/test/content_browser_test_utils.h" |
17 #include "content/shell/browser/shell.h" | 17 #include "content/shell/browser/shell.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/aura/window_tree_host.h" | 19 #include "ui/aura/window_tree_host.h" |
| 20 #include "ui/display/display_switches.h" |
20 #include "ui/events/event_utils.h" | 21 #include "ui/events/event_utils.h" |
21 #include "ui/events/test/event_generator.h" | 22 #include "ui/events/test/event_generator.h" |
22 #include "ui/gfx/switches.h" | |
23 #include "ui/touch_selection/touch_selection_controller_test_api.h" | 23 #include "ui/touch_selection/touch_selection_controller_test_api.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 namespace { | 26 namespace { |
27 | 27 |
28 bool JSONToPoint(const std::string& str, gfx::PointF* point) { | 28 bool JSONToPoint(const std::string& str, gfx::PointF* point) { |
29 std::unique_ptr<base::Value> value = base::JSONReader::Read(str); | 29 std::unique_ptr<base::Value> value = base::JSONReader::Read(str); |
30 if (!value) | 30 if (!value) |
31 return false; | 31 return false; |
32 base::DictionaryValue* root; | 32 base::DictionaryValue* root; |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 | 661 |
662 // The handle should have moved to right. | 662 // The handle should have moved to right. |
663 EXPECT_EQ(initial_handle_rect.y(), moved_handle_rect.y()); | 663 EXPECT_EQ(initial_handle_rect.y(), moved_handle_rect.y()); |
664 EXPECT_LT(initial_handle_rect.x(), moved_handle_rect.x()); | 664 EXPECT_LT(initial_handle_rect.x(), moved_handle_rect.x()); |
665 | 665 |
666 EXPECT_EQ(ui::TouchSelectionController::INSERTION_ACTIVE, | 666 EXPECT_EQ(ui::TouchSelectionController::INSERTION_ACTIVE, |
667 rwhva->selection_controller()->active_status()); | 667 rwhva->selection_controller()->active_status()); |
668 } | 668 } |
669 | 669 |
670 } // namespace content | 670 } // namespace content |
OLD | NEW |