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

Side by Side Diff: chrome/browser/accessibility/renderer_accessibility_browsertest.cc

Issue 7966013: Rewrite renderer accessibility to not use WebAccessibilityCache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Check properties of the root element of the tree. 123 // Check properties of the root element of the tree.
124 EXPECT_STREQ(url_str, GetAttr(tree, WebAccessibility::ATTR_DOC_URL).c_str()); 124 EXPECT_STREQ(url_str, GetAttr(tree, WebAccessibility::ATTR_DOC_URL).c_str());
125 EXPECT_STREQ( 125 EXPECT_STREQ(
126 "Accessibility Test", 126 "Accessibility Test",
127 GetAttr(tree, WebAccessibility::ATTR_DOC_TITLE).c_str()); 127 GetAttr(tree, WebAccessibility::ATTR_DOC_TITLE).c_str());
128 EXPECT_STREQ( 128 EXPECT_STREQ(
129 "html", GetAttr(tree, WebAccessibility::ATTR_DOC_DOCTYPE).c_str()); 129 "html", GetAttr(tree, WebAccessibility::ATTR_DOC_DOCTYPE).c_str());
130 EXPECT_STREQ( 130 EXPECT_STREQ(
131 "text/html", GetAttr(tree, WebAccessibility::ATTR_DOC_MIMETYPE).c_str()); 131 "text/html", GetAttr(tree, WebAccessibility::ATTR_DOC_MIMETYPE).c_str());
132 EXPECT_STREQ("Accessibility Test", UTF16ToUTF8(tree.name).c_str()); 132 EXPECT_STREQ("Accessibility Test", UTF16ToUTF8(tree.name).c_str());
133 EXPECT_EQ(WebAccessibility::ROLE_WEB_AREA, tree.role); 133 EXPECT_EQ(WebAccessibility::ROLE_ROOT_WEB_AREA, tree.role);
134 134
135 // Check properites of the BODY element. 135 // Check properites of the BODY element.
136 ASSERT_EQ(1U, tree.children.size()); 136 ASSERT_EQ(1U, tree.children.size());
137 const WebAccessibility& body = tree.children[0]; 137 const WebAccessibility& body = tree.children[0];
138 EXPECT_EQ(WebAccessibility::ROLE_GROUP, body.role); 138 EXPECT_EQ(WebAccessibility::ROLE_GROUP, body.role);
139 EXPECT_STREQ("body", GetAttr(body, WebAccessibility::ATTR_HTML_TAG).c_str()); 139 EXPECT_STREQ("body", GetAttr(body, WebAccessibility::ATTR_HTML_TAG).c_str());
140 EXPECT_STREQ("block", GetAttr(body, WebAccessibility::ATTR_DISPLAY).c_str()); 140 EXPECT_STREQ("block", GetAttr(body, WebAccessibility::ATTR_DISPLAY).c_str());
141 141
142 // Check properties of the two children of the BODY element. 142 // Check properties of the two children of the BODY element.
143 ASSERT_EQ(2U, body.children.size()); 143 ASSERT_EQ(2U, body.children.size());
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX)); 410 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX));
411 EXPECT_EQ(1, GetIntAttr(cell3, 411 EXPECT_EQ(1, GetIntAttr(cell3,
412 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN)); 412 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN));
413 EXPECT_EQ(1, GetIntAttr(cell4, 413 EXPECT_EQ(1, GetIntAttr(cell4,
414 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX)); 414 WebAccessibility::ATTR_TABLE_CELL_COLUMN_INDEX));
415 EXPECT_EQ(2, GetIntAttr(cell4, 415 EXPECT_EQ(2, GetIntAttr(cell4,
416 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN)); 416 WebAccessibility::ATTR_TABLE_CELL_COLUMN_SPAN));
417 } 417 }
418 418
419 } // namespace 419 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698