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

Unified Diff: content/renderer/gpu/actions_parser.cc

Issue 2629693002: Replace pen actions in pointer event tests with pointerActionSequence (Closed)
Patch Set: pointer pen test Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/actions_parser.cc
diff --git a/content/renderer/gpu/actions_parser.cc b/content/renderer/gpu/actions_parser.cc
index 438c584d5f7df9b3dca1d5f37a04b6f53856e8b6..650fd439639846ea2a5efb6b4cf41bf2672a0278 100644
--- a/content/renderer/gpu/actions_parser.cc
+++ b/content/renderer/gpu/actions_parser.cc
@@ -33,6 +33,8 @@ SyntheticGestureParams::GestureSourceType ToSyntheticGestureSourceType(
return SyntheticGestureParams::TOUCH_INPUT;
else if (source_type == "mouse")
return SyntheticGestureParams::MOUSE_INPUT;
+ else if (source_type == "pen")
+ return SyntheticGestureParams::PEN_INPUT;
else
return SyntheticGestureParams::DEFAULT_INPUT;
}
@@ -60,7 +62,8 @@ ActionsParser::~ActionsParser() {}
bool ActionsParser::ParsePointerActionSequence() {
const base::ListValue* pointer_list;
- if (!pointer_actions_value_->GetAsList(&pointer_list)) {
+ if (!pointer_actions_value_ ||
+ !pointer_actions_value_->GetAsList(&pointer_list)) {
error_message_ =
base::StringPrintf("pointer_list is missing or not a list");
return false;
@@ -106,7 +109,7 @@ bool ActionsParser::ParsePointerActions(const base::DictionaryValue& pointer) {
base::StringPrintf("source type is missing or not a string");
return false;
} else if (source_type != "touch" && source_type != "mouse" &&
- source_type != "pointer") {
+ source_type != "pen") {
error_message_ =
base::StringPrintf("source type is an unsupported input source");
return false;
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698