OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Check properties of the root element of the tree. | 125 // Check properties of the root element of the tree. |
126 EXPECT_STREQ(url_str, GetAttr(tree, WebAccessibility::ATTR_DOC_URL).c_str()); | 126 EXPECT_STREQ(url_str, GetAttr(tree, WebAccessibility::ATTR_DOC_URL).c_str()); |
127 EXPECT_STREQ( | 127 EXPECT_STREQ( |
128 "Accessibility Test", | 128 "Accessibility Test", |
129 GetAttr(tree, WebAccessibility::ATTR_DOC_TITLE).c_str()); | 129 GetAttr(tree, WebAccessibility::ATTR_DOC_TITLE).c_str()); |
130 EXPECT_STREQ( | 130 EXPECT_STREQ( |
131 "html", GetAttr(tree, WebAccessibility::ATTR_DOC_DOCTYPE).c_str()); | 131 "html", GetAttr(tree, WebAccessibility::ATTR_DOC_DOCTYPE).c_str()); |
132 EXPECT_STREQ( | 132 EXPECT_STREQ( |
133 "text/html", GetAttr(tree, WebAccessibility::ATTR_DOC_MIMETYPE).c_str()); | 133 "text/html", GetAttr(tree, WebAccessibility::ATTR_DOC_MIMETYPE).c_str()); |
134 EXPECT_STREQ("Accessibility Test", UTF16ToUTF8(tree.name).c_str()); | 134 EXPECT_STREQ("Accessibility Test", UTF16ToUTF8(tree.name).c_str()); |
135 EXPECT_EQ(WebAccessibility::ROLE_WEB_AREA, tree.role); | 135 EXPECT_EQ(WebAccessibility::ROLE_ROOT_WEB_AREA, tree.role); |
136 | 136 |
137 // Check properites of the BODY element. | 137 // Check properites of the BODY element. |
138 ASSERT_EQ(1U, tree.children.size()); | 138 ASSERT_EQ(1U, tree.children.size()); |
139 const WebAccessibility& body = tree.children[0]; | 139 const WebAccessibility& body = tree.children[0]; |
140 EXPECT_EQ(WebAccessibility::ROLE_GROUP, body.role); | 140 EXPECT_EQ(WebAccessibility::ROLE_GROUP, body.role); |
141 EXPECT_STREQ("body", GetAttr(body, WebAccessibility::ATTR_HTML_TAG).c_str()); | 141 EXPECT_STREQ("body", GetAttr(body, WebAccessibility::ATTR_HTML_TAG).c_str()); |
142 EXPECT_STREQ("block", GetAttr(body, WebAccessibility::ATTR_DISPLAY).c_str()); | 142 EXPECT_STREQ("block", GetAttr(body, WebAccessibility::ATTR_DISPLAY).c_str()); |
143 | 143 |
144 // Check properties of the two children of the BODY element. | 144 // Check properties of the two children of the BODY element. |
145 ASSERT_EQ(2U, body.children.size()); | 145 ASSERT_EQ(2U, body.children.size()); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX)); | 412 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX)); |
413 EXPECT_EQ(1, GetIntAttr(cell3, | 413 EXPECT_EQ(1, GetIntAttr(cell3, |
414 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN)); | 414 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN)); |
415 EXPECT_EQ(1, GetIntAttr(cell4, | 415 EXPECT_EQ(1, GetIntAttr(cell4, |
416 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX)); | 416 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX)); |
417 EXPECT_EQ(2, GetIntAttr(cell4, | 417 EXPECT_EQ(2, GetIntAttr(cell4, |
418 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN)); | 418 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN)); |
419 } | 419 } |
420 | 420 |
421 } // namespace | 421 } // namespace |
OLD | NEW |