Fix OSR accessibility tests (issue #2312)

This commit is contained in:
Marshall Greenblatt 2017-12-12 15:57:38 -05:00
parent 4c795f5188
commit d5e141648b
1 changed files with 11 additions and 9 deletions

View File

@ -135,8 +135,8 @@ class AccessibilityTestHandler : public TestHandler,
// Get the first update dict and validate event type
CefRefPtr<CefDictionaryValue> dict = list->GetDictionary(0);
// ignore other events
if (dict->GetString("event_type").ToString() != "layoutComplete")
// Ignore other events.
if (dict->GetString("event_type") != "layoutComplete")
break;
SetEditBoxIdAndRect(dict->GetDictionary("update"));
@ -159,8 +159,8 @@ class AccessibilityTestHandler : public TestHandler,
// Get the first update dict and validate event type
CefRefPtr<CefDictionaryValue> dict = list->GetDictionary(0);
// ignore other events
if (dict->GetString("event_type").ToString() != "layoutComplete")
// Ignore other events.
if (dict->GetString("event_type") != "layoutComplete")
break;
// Now post a delayed task to trigger focus to edit box
@ -183,9 +183,9 @@ class AccessibilityTestHandler : public TestHandler,
// Get the first update dict and validate event type
CefRefPtr<CefDictionaryValue> dict = list->GetDictionary(0);
// Validate Event type is Focus change
EXPECT_STREQ("focus",
dict->GetString("event_type").ToString().c_str());
// Ignore other events.
if (dict->GetString("event_type") != "focus")
return;
// And Focus is set to expected element edit_box
EXPECT_TRUE(edit_box_id_ == dict->GetInt("id"));
@ -295,8 +295,10 @@ class AccessibilityTestHandler : public TestHandler,
// Get the first update dict and validate event type.
CefRefPtr<CefDictionaryValue> dict = list->GetDictionary(0);
EXPECT_STREQ("layoutComplete",
dict->GetString("event_type").ToString().c_str());
// Ignore other events.
if (dict->GetString("event_type") != "layoutComplete")
return;
// Get update and validate it has tree data
CefRefPtr<CefDictionaryValue> update = dict->GetDictionary("update");