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

Unified Diff: chrome/test/webdriver/web_element_id.h

Issue 7522024: Refactor chromedriver's script execution to reduce amount of custom Value parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/webdriver/utility_functions_unittest.cc ('k') | chrome/test/webdriver/web_element_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/web_element_id.h
diff --git a/chrome/test/webdriver/web_element_id.h b/chrome/test/webdriver/web_element_id.h
index 037f6335fc3fd673ba042e07118939cc475c3df3..05716f5eef3080aff9aaa4f8a978b26e5a230b27 100644
--- a/chrome/test/webdriver/web_element_id.h
+++ b/chrome/test/webdriver/web_element_id.h
@@ -8,6 +8,8 @@
#include <string>
+#include "chrome/test/automation/value_conversion_traits.h"
+
namespace base {
class Value;
}
@@ -27,7 +29,7 @@ class WebElementId {
// Creates a |WebElementId| from an element dictionary returned by a WebDriver
// atom. It will be valid iff the dictionary is correctly constructed.
- explicit WebElementId(base::Value* value);
+ explicit WebElementId(const base::Value* value);
~WebElementId();
@@ -60,4 +62,12 @@ struct LocatorType {
} // namespace webdriver
+template <>
+struct ValueConversionTraits<webdriver::WebElementId> {
+ static base::Value* CreateValueFrom(const webdriver::WebElementId& t);
+ static bool SetFromValue(
+ const base::Value* value, webdriver::WebElementId* t);
+ static bool CanConvert(const base::Value* value);
+};
+
#endif // CHROME_TEST_WEBDRIVER_WEB_ELEMENT_ID_H_
« no previous file with comments | « chrome/test/webdriver/utility_functions_unittest.cc ('k') | chrome/test/webdriver/web_element_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698