| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "base/win/scoped_bstr.h" | 7 #include "base/win/scoped_bstr.h" |
| 8 #include "base/win/scoped_comptr.h" | 8 #include "base/win/scoped_comptr.h" |
| 9 #include "base/win/scoped_variant.h" | 9 #include "base/win/scoped_variant.h" |
| 10 #include "content/browser/accessibility/browser_accessibility_manager.h" | 10 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 ASSERT_EQ(S_FALSE, text1_obj->get_textAtOffset( | 374 ASSERT_EQ(S_FALSE, text1_obj->get_textAtOffset( |
| 375 text1_len, IA2_TEXT_BOUNDARY_CHAR, &start, &end, text.Receive())); | 375 text1_len, IA2_TEXT_BOUNDARY_CHAR, &start, &end, text.Receive())); |
| 376 ASSERT_EQ(text1_len, start); | 376 ASSERT_EQ(text1_len, start); |
| 377 ASSERT_EQ(text1_len, end); | 377 ASSERT_EQ(text1_len, end); |
| 378 text.Reset(); | 378 text.Reset(); |
| 379 | 379 |
| 380 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( | 380 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( |
| 381 1, IA2_TEXT_BOUNDARY_WORD, &start, &end, text.Receive())); | 381 1, IA2_TEXT_BOUNDARY_WORD, &start, &end, text.Receive())); |
| 382 ASSERT_EQ(0, start); | 382 ASSERT_EQ(0, start); |
| 383 ASSERT_EQ(3, end); | 383 ASSERT_EQ(4, end); |
| 384 ASSERT_STREQ(L"One", text); | 384 ASSERT_STREQ(L"One ", text); |
| 385 text.Reset(); | 385 text.Reset(); |
| 386 | 386 |
| 387 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( | 387 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( |
| 388 6, IA2_TEXT_BOUNDARY_WORD, &start, &end, text.Receive())); | 388 6, IA2_TEXT_BOUNDARY_WORD, &start, &end, text.Receive())); |
| 389 ASSERT_EQ(4, start); | 389 ASSERT_EQ(4, start); |
| 390 ASSERT_EQ(7, end); | 390 ASSERT_EQ(8, end); |
| 391 ASSERT_STREQ(L"two", text); | 391 ASSERT_STREQ(L"two\n", text); |
| 392 text.Reset(); | 392 text.Reset(); |
| 393 | 393 |
| 394 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( | 394 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( |
| 395 text1_len, IA2_TEXT_BOUNDARY_WORD, &start, &end, text.Receive())); | 395 text1_len, IA2_TEXT_BOUNDARY_WORD, &start, &end, text.Receive())); |
| 396 ASSERT_EQ(25, start); | 396 ASSERT_EQ(25, start); |
| 397 ASSERT_EQ(29, end); | 397 ASSERT_EQ(29, end); |
| 398 ASSERT_STREQ(L"six.", text); | 398 ASSERT_STREQ(L"six.", text); |
| 399 text.Reset(); | 399 text.Reset(); |
| 400 | 400 |
| 401 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( | 401 ASSERT_EQ(S_OK, text1_obj->get_textAtOffset( |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 EXPECT_EQ(1 << ui::AX_STATE_BUSY | | 697 EXPECT_EQ(1 << ui::AX_STATE_BUSY | |
| 698 1 << ui::AX_STATE_READ_ONLY | | 698 1 << ui::AX_STATE_READ_ONLY | |
| 699 1 << ui::AX_STATE_ENABLED, | 699 1 << ui::AX_STATE_ENABLED, |
| 700 root->GetState()); | 700 root->GetState()); |
| 701 | 701 |
| 702 LONG unique_id_win = root->ToBrowserAccessibilityWin()->unique_id_win(); | 702 LONG unique_id_win = root->ToBrowserAccessibilityWin()->unique_id_win(); |
| 703 ASSERT_EQ(root, manager->GetFromUniqueIdWin(unique_id_win)); | 703 ASSERT_EQ(root, manager->GetFromUniqueIdWin(unique_id_win)); |
| 704 } | 704 } |
| 705 | 705 |
| 706 } // namespace content | 706 } // namespace content |
| OLD | NEW |