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

Unified Diff: chrome/common/render_messages_unittest.cc

Issue 3013035: Add html node info (tag name, attributes, and computed display) and document... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add html node info (tag name, attributes, and computed display) and document... Created 10 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/common/render_messages.cc ('k') | webkit/glue/webaccessibility.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages_unittest.cc
===================================================================
--- chrome/common/render_messages_unittest.cc (revision 57849)
+++ chrome/common/render_messages_unittest.cc (working copy)
@@ -23,6 +23,10 @@
(1 << webkit_glue::WebAccessibility::STATE_CHECKED) |
(1 << webkit_glue::WebAccessibility::STATE_FOCUSED);
input.location = WebKit::WebRect(11, 22, 333, 444);
+ input.html_attributes.push_back(
+ std::pair<string16, string16>(ASCIIToUTF16("id"), ASCIIToUTF16("a")));
+ input.html_attributes.push_back(
+ std::pair<string16, string16>(ASCIIToUTF16("class"), ASCIIToUTF16("b")));
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
IPC::WriteParam(&msg, input);
@@ -39,6 +43,15 @@
EXPECT_EQ(input.state, output.state);
EXPECT_EQ(input.location, output.location);
EXPECT_EQ(input.children.size(), output.children.size());
+ EXPECT_EQ(input.html_attributes.size(), output.html_attributes.size());
+ EXPECT_EQ(input.html_attributes[0].first,
+ output.html_attributes[0].first);
+ EXPECT_EQ(input.html_attributes[0].second,
+ output.html_attributes[0].second);
+ EXPECT_EQ(input.html_attributes[1].first,
+ output.html_attributes[1].first);
+ EXPECT_EQ(input.html_attributes[1].second,
+ output.html_attributes[1].second);
// Test a corrupt case.
IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL);
« no previous file with comments | « chrome/common/render_messages.cc ('k') | webkit/glue/webaccessibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698