summaryrefslogtreecommitdiffstats
path: root/chrome/browser/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/accessibility')
-rw-r--r--chrome/browser/accessibility/browser_accessibility_mac_unittest.mm3
-rw-r--r--chrome/browser/accessibility/browser_accessibility_manager_unittest.cc11
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm b/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm
index fee3fd7..2b1d7f8 100644
--- a/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm
+++ b/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm
@@ -50,6 +50,7 @@ class BrowserAccessibilityTest : public CocoaTest {
virtual void SetUp() {
CocoaTest::SetUp();
WebAccessibility root;
+ root.id = 1000;
root.location.set_width(500);
root.location.set_height(100);
root.role = WebAccessibility::ROLE_WEB_AREA;
@@ -57,12 +58,14 @@ class BrowserAccessibilityTest : public CocoaTest {
ASCIIToUTF16("HelpText");
WebAccessibility child1;
+ child1.id = 1001;
child1.name = ASCIIToUTF16("Child1");
child1.location.set_width(250);
child1.location.set_height(100);
child1.role = WebAccessibility::ROLE_BUTTON;
WebAccessibility child2;
+ child2.id = 1002;
child2.location.set_x(250);
child2.location.set_width(250);
child2.location.set_height(100);
diff --git a/chrome/browser/accessibility/browser_accessibility_manager_unittest.cc b/chrome/browser/accessibility/browser_accessibility_manager_unittest.cc
index 3bbc2d3..51691ec 100644
--- a/chrome/browser/accessibility/browser_accessibility_manager_unittest.cc
+++ b/chrome/browser/accessibility/browser_accessibility_manager_unittest.cc
@@ -604,7 +604,7 @@ TEST(BrowserAccessibilityManagerTest, TestCreateEmptyDocument) {
tree2_1.role = WebAccessibility::ROLE_WEB_AREA;
WebAccessibility tree2_2;
- tree2_2.id = 1001;
+ tree2_2.id = 1002;
tree2_2.role = WebAccessibility::ROLE_BUTTON;
tree2_1.children.push_back(tree2_2);
@@ -614,17 +614,14 @@ TEST(BrowserAccessibilityManagerTest, TestCreateEmptyDocument) {
// Fire another load complete.
manager->OnAccessibilityNotifications(params);
- BrowserAccessibility* acc2_2 = manager->GetFromRendererID(1001);
+ BrowserAccessibility* acc2_2 = manager->GetFromRendererID(1002);
// Verify the root has not changed.
EXPECT_EQ(root, manager->GetRoot());
- // And the proper child remains.
+ // And the new child exists.
EXPECT_EQ(WebAccessibility::ROLE_BUTTON, acc2_2->role());
- EXPECT_EQ(1001, acc2_2->renderer_id());
-
- // Verify we don't reuse objects that have changed roles.
- EXPECT_NE(acc1_2, acc2_2);
+ EXPECT_EQ(1002, acc2_2->renderer_id());
// Ensure we properly cleaned up.
manager.reset();