Index: content/shell/renderer/test_runner/event_sender.cc |
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc |
index 4c90eb413004dc5e1644f4fbda21b9a952ef0053..f298b844988ed86e28b00ba6e46adad4b9d75240 100644 |
--- a/content/shell/renderer/test_runner/event_sender.cc |
+++ b/content/shell/renderer/test_runner/event_sender.cc |
@@ -125,6 +125,8 @@ const int kMultipleClickRadiusPixels = 5; |
const char kSubMenuDepthIdentifier[] = "_"; |
const char kSubMenuIdentifier[] = " >"; |
const char kSeparatorIdentifier[] = "---------"; |
+const char kDisabledIdentifier[] = "#"; |
+const char kCheckedIdentifier[] = "*"; |
bool OutsideMultiClickRadius(const WebPoint& a, const WebPoint& b) { |
return ((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) > |
@@ -134,15 +136,20 @@ bool OutsideMultiClickRadius(const WebPoint& a, const WebPoint& b) { |
void PopulateCustomItems(const WebVector<WebMenuItemInfo>& customItems, |
const std::string& prefix, std::vector<std::string>* strings) { |
for (size_t i = 0; i < customItems.size(); ++i) { |
+ std::string prefixCopy = prefix; |
+ if (!customItems[i].enabled) |
+ prefixCopy = kDisabledIdentifier + prefix; |
+ if (customItems[i].checked) |
+ prefixCopy = kCheckedIdentifier + prefix; |
if (customItems[i].type == blink::WebMenuItemInfo::Separator) { |
- strings->push_back(prefix + kSeparatorIdentifier); |
+ strings->push_back(prefixCopy + kSeparatorIdentifier); |
} else if (customItems[i].type == blink::WebMenuItemInfo::SubMenu) { |
- strings->push_back(prefix + customItems[i].label.utf8() + |
+ strings->push_back(prefixCopy + customItems[i].label.utf8() + |
kSubMenuIdentifier); |
- PopulateCustomItems(customItems[i].subMenuItems, prefix + |
+ PopulateCustomItems(customItems[i].subMenuItems, prefixCopy + |
kSubMenuDepthIdentifier, strings); |
} else { |
- strings->push_back(prefix + customItems[i].label.utf8()); |
+ strings->push_back(prefixCopy + customItems[i].label.utf8()); |
} |
} |
} |