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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win_unittest.cc

Issue 1416873015: Text controls should expose their value instead of their name via IAccessibleText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added browser tests and re-introduced IsControl. Expanded unit test. Created 5 years, 1 month 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
OLDNEW
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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 477
478 // Delete the manager and test that all BrowserAccessibility instances are 478 // Delete the manager and test that all BrowserAccessibility instances are
479 // deleted. 479 // deleted.
480 manager.reset(); 480 manager.reset();
481 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances()); 481 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances());
482 } 482 }
483 483
484 TEST_F(BrowserAccessibilityTest, TestSimpleHypertext) { 484 TEST_F(BrowserAccessibilityTest, TestSimpleHypertext) {
485 const std::string text1_name = "One two three."; 485 const std::string text1_name = "One two three.";
486 const std::string text2_name = " Four five six."; 486 const std::string text2_name = " Four five six.";
487 const size_t text_name_len = text1_name.length() + text2_name.length();
487 488
488 ui::AXNodeData text1; 489 ui::AXNodeData text1;
489 text1.id = 11; 490 text1.id = 11;
490 text1.role = ui::AX_ROLE_STATIC_TEXT; 491 text1.role = ui::AX_ROLE_STATIC_TEXT;
491 text1.state = 1 << ui::AX_STATE_READ_ONLY; 492 text1.state = 1 << ui::AX_STATE_READ_ONLY;
492 text1.SetName(text1_name); 493 text1.SetName(text1_name);
493 494
494 ui::AXNodeData text2; 495 ui::AXNodeData text2;
495 text2.id = 12; 496 text2.id = 12;
496 text2.role = ui::AX_ROLE_STATIC_TEXT; 497 text2.role = ui::AX_ROLE_STATIC_TEXT;
497 text2.state = 1 << ui::AX_STATE_READ_ONLY; 498 text2.state = 1 << ui::AX_STATE_READ_ONLY;
498 text2.SetName(text2_name); 499 text2.SetName(text2_name);
499 500
500 ui::AXNodeData root; 501 ui::AXNodeData root;
501 root.id = 1; 502 root.id = 1;
502 root.role = ui::AX_ROLE_ROOT_WEB_AREA; 503 root.role = ui::AX_ROLE_ROOT_WEB_AREA;
503 root.state = 1 << ui::AX_STATE_READ_ONLY; 504 root.state = 1 << ui::AX_STATE_READ_ONLY;
504 root.child_ids.push_back(11); 505 root.child_ids.push_back(text1.id);
505 root.child_ids.push_back(12); 506 root.child_ids.push_back(text2.id);
506 507
507 CountedBrowserAccessibility::reset(); 508 CountedBrowserAccessibility::reset();
508 scoped_ptr<BrowserAccessibilityManager> manager( 509 scoped_ptr<BrowserAccessibilityManager> manager(
509 BrowserAccessibilityManager::Create( 510 BrowserAccessibilityManager::Create(
510 MakeAXTreeUpdate(root, text1, text2), 511 MakeAXTreeUpdate(root, text1, text2), nullptr,
511 NULL, new CountedBrowserAccessibilityFactory())); 512 new CountedBrowserAccessibilityFactory()));
512 ASSERT_EQ(3, CountedBrowserAccessibility::num_instances()); 513 ASSERT_EQ(3, CountedBrowserAccessibility::num_instances());
513 514
514 BrowserAccessibilityWin* root_obj = 515 BrowserAccessibilityWin* root_obj =
515 manager->GetRoot()->ToBrowserAccessibilityWin(); 516 manager->GetRoot()->ToBrowserAccessibilityWin();
516 517
517 long text_len; 518 long text_len;
518 ASSERT_EQ(S_OK, root_obj->get_nCharacters(&text_len)); 519 EXPECT_EQ(S_OK, root_obj->get_nCharacters(&text_len));
520 EXPECT_EQ(text_name_len, text_len);
519 521
520 base::win::ScopedBstr text; 522 base::win::ScopedBstr text;
521 ASSERT_EQ(S_OK, root_obj->get_text(0, text_len, text.Receive())); 523 EXPECT_EQ(S_OK, root_obj->get_text(0, text_name_len, text.Receive()));
522 EXPECT_EQ(text1_name + text2_name, base::UTF16ToUTF8(base::string16(text))); 524 EXPECT_EQ(text1_name + text2_name, base::UTF16ToUTF8(base::string16(text)));
523 525
524 long hyperlink_count; 526 long hyperlink_count;
525 ASSERT_EQ(S_OK, root_obj->get_nHyperlinks(&hyperlink_count)); 527 EXPECT_EQ(S_OK, root_obj->get_nHyperlinks(&hyperlink_count));
526 EXPECT_EQ(0, hyperlink_count); 528 EXPECT_EQ(0, hyperlink_count);
527 529
528 base::win::ScopedComPtr<IAccessibleHyperlink> hyperlink; 530 base::win::ScopedComPtr<IAccessibleHyperlink> hyperlink;
529 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(-1, hyperlink.Receive())); 531 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(-1, hyperlink.Receive()));
530 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(0, hyperlink.Receive())); 532 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(0, hyperlink.Receive()));
531 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(28, hyperlink.Receive())); 533 EXPECT_EQ(E_INVALIDARG,
532 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(29, hyperlink.Receive())); 534 root_obj->get_hyperlink(text_name_len, hyperlink.Receive()));
535 EXPECT_EQ(E_INVALIDARG,
536 root_obj->get_hyperlink(text_name_len + 1, hyperlink.Receive()));
533 537
534 long hyperlink_index; 538 long hyperlink_index;
535 EXPECT_EQ(E_FAIL, root_obj->get_hyperlinkIndex(0, &hyperlink_index)); 539 EXPECT_EQ(E_FAIL, root_obj->get_hyperlinkIndex(0, &hyperlink_index));
536 EXPECT_EQ(-1, hyperlink_index); 540 EXPECT_EQ(-1, hyperlink_index);
537 EXPECT_EQ(E_FAIL, root_obj->get_hyperlinkIndex(28, &hyperlink_index)); 541 EXPECT_EQ(E_FAIL,
542 root_obj->get_hyperlinkIndex(text_name_len, &hyperlink_index));
538 EXPECT_EQ(-1, hyperlink_index); 543 EXPECT_EQ(-1, hyperlink_index);
539 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlinkIndex(-1, &hyperlink_index)); 544 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlinkIndex(-1, &hyperlink_index));
540 EXPECT_EQ(-1, hyperlink_index); 545 EXPECT_EQ(-1, hyperlink_index);
541 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlinkIndex(29, &hyperlink_index)); 546 EXPECT_EQ(E_INVALIDARG,
547 root_obj->get_hyperlinkIndex(text_name_len + 1, &hyperlink_index));
542 EXPECT_EQ(-1, hyperlink_index); 548 EXPECT_EQ(-1, hyperlink_index);
543 549
544 // Delete the manager and test that all BrowserAccessibility instances are
545 // deleted.
546 manager.reset(); 550 manager.reset();
547 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances()); 551 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances());
548 } 552 }
549 553
550 TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { 554 TEST_F(BrowserAccessibilityTest, TestComplexHypertext) {
551 const std::string text1_name = "One two three."; 555 const base::string16 text1_name = L"One two three.";
552 const std::string text2_name = " Four five six."; 556 const base::string16 combo_box_name = L"City:";
553 const std::string button1_text_name = "red"; 557 const base::string16 combo_box_value = L"Happyland";
554 const std::string link1_text_name = "blue"; 558 const base::string16 text2_name = L" Four five six.";
559 const base::string16 check_box_name = L"I agree";
560 const base::string16 check_box_value = L"Checked";
561 const base::string16 button_text_name = L"Red";
562 const base::string16 link_text_name = L"Blue";
563 // Each control (combo / check box, button and link) will be represented by an
564 // embedded object character.
565 const base::string16 embed(1, BrowserAccessibilityWin::kEmbeddedCharacter);
566 const base::string16 root_hypertext =
567 text1_name + embed + text2_name + embed + embed + embed;
568 const size_t root_hypertext_len = root_hypertext.length();
555 569
556 ui::AXNodeData text1; 570 ui::AXNodeData text1;
557 text1.id = 11; 571 text1.id = 11;
558 text1.role = ui::AX_ROLE_STATIC_TEXT; 572 text1.role = ui::AX_ROLE_STATIC_TEXT;
559 text1.state = 1 << ui::AX_STATE_READ_ONLY; 573 text1.state = 1 << ui::AX_STATE_READ_ONLY;
560 text1.SetName(text1_name); 574 text1.SetName(base::UTF16ToUTF8(text1_name));
575
576 ui::AXNodeData combo_box;
577 combo_box.id = 12;
578 combo_box.role = ui::AX_ROLE_COMBO_BOX;
579 combo_box.SetName(base::UTF16ToUTF8(combo_box_name));
580 combo_box.SetValue(base::UTF16ToUTF8(combo_box_value));
561 581
562 ui::AXNodeData text2; 582 ui::AXNodeData text2;
563 text2.id = 12; 583 text2.id = 13;
564 text2.role = ui::AX_ROLE_STATIC_TEXT; 584 text2.role = ui::AX_ROLE_STATIC_TEXT;
565 text2.state = 1 << ui::AX_STATE_READ_ONLY; 585 text2.state = 1 << ui::AX_STATE_READ_ONLY;
566 text2.SetName(text2_name); 586 text2.SetName(base::UTF16ToUTF8(text2_name));
567 587
568 ui::AXNodeData button1, button1_text; 588 ui::AXNodeData check_box;
569 button1.id = 13; 589 check_box.id = 14;
570 button1_text.id = 15; 590 check_box.role = ui::AX_ROLE_CHECK_BOX;
571 button1_text.SetName(button1_text_name); 591 check_box.state = 1 << ui::AX_STATE_CHECKED;
572 button1.role = ui::AX_ROLE_BUTTON; 592 check_box.SetName(base::UTF16ToUTF8(check_box_name));
573 button1_text.role = ui::AX_ROLE_STATIC_TEXT; 593 check_box.SetValue(base::UTF16ToUTF8(check_box_value));
574 button1.state = 1 << ui::AX_STATE_READ_ONLY;
575 button1_text.state = 1 << ui::AX_STATE_READ_ONLY;
576 button1.child_ids.push_back(15);
577 594
578 ui::AXNodeData link1, link1_text; 595 ui::AXNodeData button, button_text;
579 link1.id = 14; 596 button.id = 15;
580 link1_text.id = 16; 597 button_text.id = 17;
581 link1_text.SetName(link1_text_name); 598 button_text.SetName(base::UTF16ToUTF8(button_text_name));
582 link1.role = ui::AX_ROLE_LINK; 599 button.role = ui::AX_ROLE_BUTTON;
583 link1_text.role = ui::AX_ROLE_STATIC_TEXT; 600 button_text.role = ui::AX_ROLE_STATIC_TEXT;
584 link1.state = 1 << ui::AX_STATE_READ_ONLY; 601 button.state = 1 << ui::AX_STATE_READ_ONLY;
585 link1_text.state = 1 << ui::AX_STATE_READ_ONLY; 602 button_text.state = 1 << ui::AX_STATE_READ_ONLY;
586 link1.child_ids.push_back(16); 603 button.child_ids.push_back(button_text.id);
604
605 ui::AXNodeData link, link_text;
606 link.id = 16;
607 link_text.id = 18;
608 link_text.SetName(base::UTF16ToUTF8(link_text_name));
609 link.role = ui::AX_ROLE_LINK;
610 link_text.role = ui::AX_ROLE_STATIC_TEXT;
611 link.state = 1 << ui::AX_STATE_READ_ONLY;
612 link_text.state = 1 << ui::AX_STATE_READ_ONLY;
613 link.child_ids.push_back(link_text.id);
587 614
588 ui::AXNodeData root; 615 ui::AXNodeData root;
589 root.id = 1; 616 root.id = 1;
590 root.role = ui::AX_ROLE_ROOT_WEB_AREA; 617 root.role = ui::AX_ROLE_ROOT_WEB_AREA;
591 root.state = 1 << ui::AX_STATE_READ_ONLY; 618 root.state = 1 << ui::AX_STATE_READ_ONLY;
592 root.child_ids.push_back(11); 619 root.child_ids.push_back(text1.id);
593 root.child_ids.push_back(13); 620 root.child_ids.push_back(combo_box.id);
594 root.child_ids.push_back(12); 621 root.child_ids.push_back(text2.id);
595 root.child_ids.push_back(14); 622 root.child_ids.push_back(check_box.id);
623 root.child_ids.push_back(button.id);
624 root.child_ids.push_back(link.id);
596 625
597 CountedBrowserAccessibility::reset(); 626 CountedBrowserAccessibility::reset();
598 scoped_ptr<BrowserAccessibilityManager> manager( 627 scoped_ptr<BrowserAccessibilityManager> manager(
599 BrowserAccessibilityManager::Create( 628 BrowserAccessibilityManager::Create(
600 MakeAXTreeUpdate(root, 629 MakeAXTreeUpdate(root, text1, combo_box, text2, check_box, button,
601 text1, button1, button1_text, 630 button_text, link, link_text),
602 text2, link1, link1_text), 631 nullptr, new CountedBrowserAccessibilityFactory()));
603 NULL, new CountedBrowserAccessibilityFactory())); 632 ASSERT_EQ(9, CountedBrowserAccessibility::num_instances());
604 ASSERT_EQ(7, CountedBrowserAccessibility::num_instances());
605 633
606 BrowserAccessibilityWin* root_obj = 634 BrowserAccessibilityWin* root_obj =
607 manager->GetRoot()->ToBrowserAccessibilityWin(); 635 manager->GetRoot()->ToBrowserAccessibilityWin();
608 636
609 long text_len; 637 long text_len;
610 ASSERT_EQ(S_OK, root_obj->get_nCharacters(&text_len)); 638 EXPECT_EQ(S_OK, root_obj->get_nCharacters(&text_len));
639 EXPECT_EQ(root_hypertext_len, text_len);
611 640
612 base::win::ScopedBstr text; 641 base::win::ScopedBstr text;
613 ASSERT_EQ(S_OK, root_obj->get_text(0, text_len, text.Receive())); 642 EXPECT_EQ(S_OK, root_obj->get_text(0, root_hypertext_len, text.Receive()));
614 const std::string embed = base::UTF16ToUTF8( 643 EXPECT_STREQ(root_hypertext.c_str(), text);
615 base::string16(1, BrowserAccessibilityWin::kEmbeddedCharacter));
616 EXPECT_EQ(text1_name + embed + text2_name + embed,
617 base::UTF16ToUTF8(base::string16(text)));
618 text.Reset(); 644 text.Reset();
619 645
620 long hyperlink_count; 646 long hyperlink_count;
621 ASSERT_EQ(S_OK, root_obj->get_nHyperlinks(&hyperlink_count)); 647 EXPECT_EQ(S_OK, root_obj->get_nHyperlinks(&hyperlink_count));
622 EXPECT_EQ(2, hyperlink_count); 648 EXPECT_EQ(4, hyperlink_count);
623 649
624 base::win::ScopedComPtr<IAccessibleHyperlink> hyperlink; 650 base::win::ScopedComPtr<IAccessibleHyperlink> hyperlink;
625 base::win::ScopedComPtr<IAccessibleText> hypertext; 651 base::win::ScopedComPtr<IAccessibleText> hypertext;
626 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(-1, hyperlink.Receive())); 652 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(-1, hyperlink.Receive()));
627 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(2, hyperlink.Receive())); 653 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(4, hyperlink.Receive()));
628 EXPECT_EQ(E_INVALIDARG, root_obj->get_hyperlink(28, hyperlink.Receive()));
629 654
655 // Get the text of the combo box.
656 // It should be its value.
630 EXPECT_EQ(S_OK, root_obj->get_hyperlink(0, hyperlink.Receive())); 657 EXPECT_EQ(S_OK, root_obj->get_hyperlink(0, hyperlink.Receive()));
658 EXPECT_EQ(S_OK, hyperlink.QueryInterface(hypertext.Receive()));
631 EXPECT_EQ(S_OK, 659 EXPECT_EQ(S_OK,
632 hyperlink.QueryInterface<IAccessibleText>(hypertext.Receive())); 660 hypertext->get_text(0, IA2_TEXT_OFFSET_LENGTH, text.Receive()));
633 EXPECT_EQ(S_OK, hypertext->get_text(0, 3, text.Receive())); 661 EXPECT_STREQ(combo_box_value.c_str(), text);
634 EXPECT_STREQ(button1_text_name.c_str(),
635 base::UTF16ToUTF8(base::string16(text)).c_str());
636 text.Reset(); 662 text.Reset();
637 hyperlink.Release(); 663 hyperlink.Release();
638 hypertext.Release(); 664 hypertext.Release();
639 665
666 // Get the text of the check box.
667 // It should be its name.
640 EXPECT_EQ(S_OK, root_obj->get_hyperlink(1, hyperlink.Receive())); 668 EXPECT_EQ(S_OK, root_obj->get_hyperlink(1, hyperlink.Receive()));
669 EXPECT_EQ(S_OK, hyperlink.QueryInterface(hypertext.Receive()));
641 EXPECT_EQ(S_OK, 670 EXPECT_EQ(S_OK,
642 hyperlink.QueryInterface<IAccessibleText>(hypertext.Receive())); 671 hypertext->get_text(0, IA2_TEXT_OFFSET_LENGTH, text.Receive()));
643 EXPECT_EQ(S_OK, hypertext->get_text(0, 4, text.Receive())); 672 EXPECT_STREQ(check_box_name.c_str(), text);
644 EXPECT_STREQ(link1_text_name.c_str(),
645 base::UTF16ToUTF8(base::string16(text)).c_str());
646 text.Reset(); 673 text.Reset();
647 hyperlink.Release(); 674 hyperlink.Release();
648 hypertext.Release(); 675 hypertext.Release();
676
677 // Get the text of the button.
678 EXPECT_EQ(S_OK, root_obj->get_hyperlink(2, hyperlink.Receive()));
679 EXPECT_EQ(S_OK, hyperlink.QueryInterface(hypertext.Receive()));
680 EXPECT_EQ(S_OK,
681 hypertext->get_text(0, IA2_TEXT_OFFSET_LENGTH, text.Receive()));
682 EXPECT_STREQ(button_text_name.c_str(), text);
683 text.Reset();
684 hyperlink.Release();
685 hypertext.Release();
686
687 // Get the text of the link.
688 EXPECT_EQ(S_OK, root_obj->get_hyperlink(3, hyperlink.Receive()));
689 EXPECT_EQ(S_OK, hyperlink.QueryInterface(hypertext.Receive()));
690 EXPECT_EQ(S_OK, hypertext->get_text(0, 4, text.Receive()));
691 EXPECT_STREQ(link_text_name.c_str(), text);
692 text.Reset();
693 hyperlink.Release();
694 hypertext.Release();
649 695
650 long hyperlink_index; 696 long hyperlink_index;
651 EXPECT_EQ(E_FAIL, root_obj->get_hyperlinkIndex(0, &hyperlink_index)); 697 EXPECT_EQ(E_FAIL, root_obj->get_hyperlinkIndex(0, &hyperlink_index));
652 EXPECT_EQ(-1, hyperlink_index); 698 EXPECT_EQ(-1, hyperlink_index);
653 EXPECT_EQ(E_FAIL, root_obj->get_hyperlinkIndex(28, &hyperlink_index)); 699 EXPECT_EQ(E_FAIL,
700 root_obj->get_hyperlinkIndex(root_hypertext_len, &hyperlink_index));
654 EXPECT_EQ(-1, hyperlink_index); 701 EXPECT_EQ(-1, hyperlink_index);
655 EXPECT_EQ(S_OK, root_obj->get_hyperlinkIndex(14, &hyperlink_index)); 702 EXPECT_EQ(S_OK, root_obj->get_hyperlinkIndex(14, &hyperlink_index));
656 EXPECT_EQ(0, hyperlink_index); 703 EXPECT_EQ(0, hyperlink_index);
657 EXPECT_EQ(S_OK, root_obj->get_hyperlinkIndex(30, &hyperlink_index)); 704 EXPECT_EQ(S_OK, root_obj->get_hyperlinkIndex(30, &hyperlink_index));
658 EXPECT_EQ(1, hyperlink_index); 705 EXPECT_EQ(1, hyperlink_index);
706 EXPECT_EQ(S_OK, root_obj->get_hyperlinkIndex(31, &hyperlink_index));
707 EXPECT_EQ(2, hyperlink_index);
708 EXPECT_EQ(S_OK, root_obj->get_hyperlinkIndex(32, &hyperlink_index));
709 EXPECT_EQ(3, hyperlink_index);
659 710
660 // Delete the manager and test that all BrowserAccessibility instances are
661 // deleted.
662 manager.reset(); 711 manager.reset();
663 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances()); 712 ASSERT_EQ(0, CountedBrowserAccessibility::num_instances());
664 } 713 }
665 714
666 TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) { 715 TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) {
667 // Try creating an empty document with busy state. Readonly is 716 // Try creating an empty document with busy state. Readonly is
668 // set automatically. 717 // set automatically.
669 CountedBrowserAccessibility::reset(); 718 CountedBrowserAccessibility::reset();
670 const int32 busy_state = 1 << ui::AX_STATE_BUSY; 719 const int32 busy_state = 1 << ui::AX_STATE_BUSY;
671 const int32 readonly_state = 1 << ui::AX_STATE_READ_ONLY; 720 const int32 readonly_state = 1 << ui::AX_STATE_READ_ONLY;
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 } 1471 }
1423 1472
1424 TEST_F(BrowserAccessibilityTest, TestSanitizeStringAttributeForIA2) { 1473 TEST_F(BrowserAccessibilityTest, TestSanitizeStringAttributeForIA2) {
1425 base::string16 input(L"\\:=,;"); 1474 base::string16 input(L"\\:=,;");
1426 base::string16 output; 1475 base::string16 output;
1427 BrowserAccessibilityWin::SanitizeStringAttributeForIA2(input, &output); 1476 BrowserAccessibilityWin::SanitizeStringAttributeForIA2(input, &output);
1428 EXPECT_EQ(L"\\\\\\:\\=\\,\\;", output); 1477 EXPECT_EQ(L"\\\\\\:\\=\\,\\;", output);
1429 } 1478 }
1430 1479
1431 } // namespace content 1480 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698