| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 EXPECT_EQ(9, CountedBrowserAccessibility::global_obj_count_); | 446 EXPECT_EQ(9, CountedBrowserAccessibility::global_obj_count_); |
| 447 | 447 |
| 448 // Check that our references to the root and container and child2 are | 448 // Check that our references to the root and container and child2 are |
| 449 // still valid, but that the reference to child3 is now invalid. | 449 // still valid, but that the reference to child3 is now invalid. |
| 450 EXPECT_TRUE(root_accessible->instance_active()); | 450 EXPECT_TRUE(root_accessible->instance_active()); |
| 451 EXPECT_TRUE(container_accessible->instance_active()); | 451 EXPECT_TRUE(container_accessible->instance_active()); |
| 452 EXPECT_TRUE(child2_accessible->instance_active()); | 452 EXPECT_TRUE(child2_accessible->instance_active()); |
| 453 EXPECT_FALSE(child3_accessible->instance_active()); | 453 EXPECT_FALSE(child3_accessible->instance_active()); |
| 454 | 454 |
| 455 // Ensure that we retain the parent of the detached subtree. | 455 // Ensure that we retain the parent of the detached subtree. |
| 456 EXPECT_EQ(root_accessible, container_accessible->GetParent()); | 456 EXPECT_EQ(root_accessible, container_accessible->PlatformGetParent()); |
| 457 EXPECT_EQ(0, container_accessible->GetIndexInParent()); | 457 EXPECT_EQ(0, container_accessible->GetIndexInParent()); |
| 458 | 458 |
| 459 // Check that the index in parent has been updated. | 459 // Check that the index in parent has been updated. |
| 460 EXPECT_EQ(2, child2_accessible->GetIndexInParent()); | 460 EXPECT_EQ(2, child2_accessible->GetIndexInParent()); |
| 461 | 461 |
| 462 // Release our references. The object count should only decrease by 1 | 462 // Release our references. The object count should only decrease by 1 |
| 463 // for child3. | 463 // for child3. |
| 464 root_accessible->NativeReleaseReference(); | 464 root_accessible->NativeReleaseReference(); |
| 465 container_accessible->NativeReleaseReference(); | 465 container_accessible->NativeReleaseReference(); |
| 466 child2_accessible->NativeReleaseReference(); | 466 child2_accessible->NativeReleaseReference(); |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_DOWNSTREAM)); | 1648 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_DOWNSTREAM)); |
| 1649 | 1649 |
| 1650 // If the affinity is upstream, check that we get the second line. | 1650 // If the affinity is upstream, check that we get the second line. |
| 1651 ASSERT_EQ(0, static_text_accessible->GetLineStartBoundary( | 1651 ASSERT_EQ(0, static_text_accessible->GetLineStartBoundary( |
| 1652 4, ui::BACKWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM)); | 1652 4, ui::BACKWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM)); |
| 1653 ASSERT_EQ(4, static_text_accessible->GetLineStartBoundary( | 1653 ASSERT_EQ(4, static_text_accessible->GetLineStartBoundary( |
| 1654 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM)); | 1654 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM)); |
| 1655 } | 1655 } |
| 1656 | 1656 |
| 1657 } // namespace content | 1657 } // namespace content |
| OLD | NEW |