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

Side by Side Diff: chrome/test/chromedriver/element_util.h

Issue 817913004: [chromedriver] Make GetElementLocationInView return the top-left coordinate rather than the center (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment to ScrollElementIntoView() Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_
6 #define CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_ 6 #define CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 Session* session, 120 Session* session,
121 WebView* web_view, 121 WebView* web_view,
122 const std::string& element_id, 122 const std::string& element_id,
123 bool selected); 123 bool selected);
124 124
125 Status ToggleOptionElement( 125 Status ToggleOptionElement(
126 Session* session, 126 Session* session,
127 WebView* web_view, 127 WebView* web_view,
128 const std::string& element_id); 128 const std::string& element_id);
129 129
130 // |offset| is an optional offset from the top-left of the first ClientRect
131 // that is returned by the element's getClientRects() function.
132 // If |offset| is null, the |location| returned will be the center of the
133 // ClientRect. If it is non-null, |location| will be offset by the specified
134 // value.
130 Status ScrollElementIntoView( 135 Status ScrollElementIntoView(
131 Session* session, 136 Session* session,
132 WebView* web_view, 137 WebView* web_view,
133 const std::string& element_id, 138 const std::string& element_id,
134 const WebPoint* offset, 139 const WebPoint* offset,
135 WebPoint* location); 140 WebPoint* location);
136 141
137 // |element_id| refers to the element which is to be scrolled into view. 142 // |element_id| refers to the element which is to be scrolled into view.
138 // |clickable_element_id| refers to the element needing clickable verification. 143 // |clickable_element_id| refers to the element needing clickable verification.
139 // They are usually the same, but can be different. This is useful when an image 144 // They are usually the same, but can be different. This is useful when an image
140 // uses map/area. The image is scrolled, but check clickable against the area. 145 // uses map/area. The image is scrolled, but check clickable against the area.
141 // If |clickable_element_id| is "", no verification will be performed. 146 // If |clickable_element_id| is "", no verification will be performed.
142 Status ScrollElementRegionIntoView( 147 Status ScrollElementRegionIntoView(
143 Session* session, 148 Session* session,
144 WebView* web_view, 149 WebView* web_view,
145 const std::string& element_id, 150 const std::string& element_id,
146 const WebRect& region, 151 const WebRect& region,
147 bool center, 152 bool center,
148 const std::string& clickable_element_id, 153 const std::string& clickable_element_id,
149 WebPoint* location); 154 WebPoint* location);
150 155
151 #endif // CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_ 156 #endif // CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/element_commands.cc ('k') | chrome/test/data/chromedriver/multiline.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698