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

Unified Diff: chrome/test/webdriver/commands/webelement_commands.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review 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
Index: chrome/test/webdriver/commands/webelement_commands.cc
diff --git a/chrome/test/webdriver/commands/webelement_commands.cc b/chrome/test/webdriver/commands/webelement_commands.cc
index 2971a678f5b5017fb8bf810cd0f42047e02c4507..7a1fdd695fe5a6a5f00dfce5b98d2dff170c1bb0 100644
--- a/chrome/test/webdriver/commands/webelement_commands.cc
+++ b/chrome/test/webdriver/commands/webelement_commands.cc
@@ -469,8 +469,7 @@ void ElementValueCommand::ExecuteGet(Response* const response) {
response->SetError(error);
return;
}
- if (!result->IsType(Value::TYPE_STRING) &&
- !result->IsType(Value::TYPE_NULL)) {
+ if (!result->IsString() && !result->IsNull()) {
response->SetError(new Error(
kUnknownError, "Result is not string or null type"));
return;
@@ -624,7 +623,7 @@ void ElementTextCommand::ExecuteGet(Response* const response) {
response->SetError(error);
return;
}
- if (!result->IsType(Value::TYPE_STRING)) {
+ if (!result->IsString()) {
response->SetError(new Error(kUnknownError, "Result is not string type"));
return;
}
« no previous file with comments | « chrome/test/webdriver/commands/set_timeout_commands_unittest.cc ('k') | chrome/test/webdriver/webdriver_basic_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698