| OLD | NEW |
| 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 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_ACTIONS_H_ | 5 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_ACTIONS_H_ |
| 6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_ACTIONS_H_ | 6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_ACTIONS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #import <EarlGrey/EarlGrey.h> | 10 #import <EarlGrey/EarlGrey.h> |
| 11 | 11 |
| 12 namespace chrome_test_util { | 12 namespace chrome_test_util { |
| 13 | 13 |
| 14 // Action to longpress on element |element_id| in the Chrome's webview. | 14 // Action to longpress on element |element_id| in the Chrome's webview. |
| 15 // If |triggers_context_menu| is true, this gesture is expected to | 15 // If |triggers_context_menu| is true, this gesture is expected to |
| 16 // cause the context menu to appear, and is not expected to trigger events | 16 // cause the context menu to appear, and is not expected to trigger events |
| 17 // in the webview. If |triggers_context_menu| is false, the converse is true. | 17 // in the webview. If |triggers_context_menu| is false, the converse is true. |
| 18 // This action doesn't fail if the context menu isn't displayed; calling code | 18 // This action doesn't fail if the context menu isn't displayed; calling code |
| 19 // should check for that separately with a matcher. | 19 // should check for that separately with a matcher. |
| 20 id<GREYAction> LongPressElementForContextMenu(const std::string& element_id, | 20 id<GREYAction> LongPressElementForContextMenu(const std::string& element_id, |
| 21 bool triggers_context_menu); | 21 bool triggers_context_menu); |
| 22 | 22 |
| 23 // TODO(crbug.com/683432): Delete this once downstream code uses the correct | |
| 24 // format. | |
| 25 id<GREYAction> longPressElementForContextMenu(const std::string& element_id, | |
| 26 bool triggers_context_menu); | |
| 27 | |
| 28 // Action to turn the switch of a CollectionViewSwitchCell to the given |on| | 23 // Action to turn the switch of a CollectionViewSwitchCell to the given |on| |
| 29 // state. | 24 // state. |
| 30 id<GREYAction> TurnCollectionViewSwitchOn(BOOL on); | 25 id<GREYAction> TurnCollectionViewSwitchOn(BOOL on); |
| 31 | 26 |
| 32 } // namespace chrome_test_util | 27 } // namespace chrome_test_util |
| 33 | 28 |
| 34 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_ACTIONS_H_ | 29 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_ACTIONS_H_ |
| OLD | NEW |