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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 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) 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 LoadHTML("<div>Page A</div>"); 530 LoadHTML("<div>Page A</div>");
531 531
532 // Load page B, which will trigger an UpdateState message for page A. 532 // Load page B, which will trigger an UpdateState message for page A.
533 LoadHTML("<div>Page B</div>"); 533 LoadHTML("<div>Page B</div>");
534 534
535 // Check for a valid UpdateState message for page A. 535 // Check for a valid UpdateState message for page A.
536 ProcessPendingMessages(); 536 ProcessPendingMessages();
537 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching( 537 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching(
538 ViewHostMsg_UpdateState::ID); 538 ViewHostMsg_UpdateState::ID);
539 ASSERT_TRUE(msg_A); 539 ASSERT_TRUE(msg_A);
540 int page_id_A; 540 ViewHostMsg_UpdateState::Param params;
541 PageState state_A; 541 ViewHostMsg_UpdateState::Read(msg_A, &params);
542 ViewHostMsg_UpdateState::Read(msg_A, &page_id_A, &state_A); 542 int page_id_A = params.a;
543 PageState state_A = params.b;
543 EXPECT_EQ(1, page_id_A); 544 EXPECT_EQ(1, page_id_A);
544 render_thread_->sink().ClearMessages(); 545 render_thread_->sink().ClearMessages();
545 546
546 // Back to page A (page_id 1) and commit. 547 // Back to page A (page_id 1) and commit.
547 FrameMsg_Navigate_Params params_A; 548 FrameMsg_Navigate_Params params_A;
548 params_A.navigation_type = FrameMsg_Navigate_Type::NORMAL; 549 params_A.navigation_type = FrameMsg_Navigate_Type::NORMAL;
549 params_A.transition = PAGE_TRANSITION_FORWARD_BACK; 550 params_A.transition = PAGE_TRANSITION_FORWARD_BACK;
550 params_A.current_history_list_length = 2; 551 params_A.current_history_list_length = 2;
551 params_A.current_history_list_offset = 1; 552 params_A.current_history_list_offset = 1;
552 params_A.pending_history_list_offset = 0; 553 params_A.pending_history_list_offset = 0;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 LoadHTML("<div>Page A</div>"); 603 LoadHTML("<div>Page A</div>");
603 604
604 // Load page B, which will trigger an UpdateState message for page A. 605 // Load page B, which will trigger an UpdateState message for page A.
605 LoadHTML("<div>Page B</div>"); 606 LoadHTML("<div>Page B</div>");
606 607
607 // Check for a valid UpdateState message for page A. 608 // Check for a valid UpdateState message for page A.
608 ProcessPendingMessages(); 609 ProcessPendingMessages();
609 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching( 610 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching(
610 ViewHostMsg_UpdateState::ID); 611 ViewHostMsg_UpdateState::ID);
611 ASSERT_TRUE(msg_A); 612 ASSERT_TRUE(msg_A);
612 int page_id_A; 613 ViewHostMsg_UpdateState::Param param;
613 PageState state_A; 614 ViewHostMsg_UpdateState::Read(msg_A, &param);
614 ViewHostMsg_UpdateState::Read(msg_A, &page_id_A, &state_A); 615 int page_id_A = param.a;
616 PageState state_A = param.b;
615 EXPECT_EQ(1, page_id_A); 617 EXPECT_EQ(1, page_id_A);
616 render_thread_->sink().ClearMessages(); 618 render_thread_->sink().ClearMessages();
617 619
618 // Load page C, which will trigger an UpdateState message for page B. 620 // Load page C, which will trigger an UpdateState message for page B.
619 LoadHTML("<div>Page C</div>"); 621 LoadHTML("<div>Page C</div>");
620 622
621 // Check for a valid UpdateState for page B. 623 // Check for a valid UpdateState for page B.
622 ProcessPendingMessages(); 624 ProcessPendingMessages();
623 const IPC::Message* msg_B = render_thread_->sink().GetUniqueMessageMatching( 625 const IPC::Message* msg_B = render_thread_->sink().GetUniqueMessageMatching(
624 ViewHostMsg_UpdateState::ID); 626 ViewHostMsg_UpdateState::ID);
625 ASSERT_TRUE(msg_B); 627 ASSERT_TRUE(msg_B);
626 int page_id_B; 628 ViewHostMsg_UpdateState::Read(msg_B, &param);
627 PageState state_B; 629 int page_id_B = param.a;
628 ViewHostMsg_UpdateState::Read(msg_B, &page_id_B, &state_B); 630 PageState state_B = param.b;
629 EXPECT_EQ(2, page_id_B); 631 EXPECT_EQ(2, page_id_B);
630 EXPECT_NE(state_A, state_B); 632 EXPECT_NE(state_A, state_B);
631 render_thread_->sink().ClearMessages(); 633 render_thread_->sink().ClearMessages();
632 634
633 // Load page D, which will trigger an UpdateState message for page C. 635 // Load page D, which will trigger an UpdateState message for page C.
634 LoadHTML("<div>Page D</div>"); 636 LoadHTML("<div>Page D</div>");
635 637
636 // Check for a valid UpdateState for page C. 638 // Check for a valid UpdateState for page C.
637 ProcessPendingMessages(); 639 ProcessPendingMessages();
638 const IPC::Message* msg_C = render_thread_->sink().GetUniqueMessageMatching( 640 const IPC::Message* msg_C = render_thread_->sink().GetUniqueMessageMatching(
639 ViewHostMsg_UpdateState::ID); 641 ViewHostMsg_UpdateState::ID);
640 ASSERT_TRUE(msg_C); 642 ASSERT_TRUE(msg_C);
641 int page_id_C; 643 ViewHostMsg_UpdateState::Read(msg_C, &param);
642 PageState state_C; 644 int page_id_C = param.a;
643 ViewHostMsg_UpdateState::Read(msg_C, &page_id_C, &state_C); 645 PageState state_C = param.b;
644 EXPECT_EQ(3, page_id_C); 646 EXPECT_EQ(3, page_id_C);
645 EXPECT_NE(state_B, state_C); 647 EXPECT_NE(state_B, state_C);
646 render_thread_->sink().ClearMessages(); 648 render_thread_->sink().ClearMessages();
647 649
648 // Go back to C and commit, preparing for our real test. 650 // Go back to C and commit, preparing for our real test.
649 FrameMsg_Navigate_Params params_C; 651 FrameMsg_Navigate_Params params_C;
650 params_C.navigation_type = FrameMsg_Navigate_Type::NORMAL; 652 params_C.navigation_type = FrameMsg_Navigate_Type::NORMAL;
651 params_C.transition = PAGE_TRANSITION_FORWARD_BACK; 653 params_C.transition = PAGE_TRANSITION_FORWARD_BACK;
652 params_C.current_history_list_length = 4; 654 params_C.current_history_list_length = 4;
653 params_C.current_history_list_offset = 3; 655 params_C.current_history_list_offset = 3;
(...skipping 29 matching lines...) Expand all
683 params.page_id = 1; 685 params.page_id = 1;
684 params.page_state = state_A; 686 params.page_state = state_A;
685 frame()->OnNavigate(params); 687 frame()->OnNavigate(params);
686 ProcessPendingMessages(); 688 ProcessPendingMessages();
687 689
688 // Now ensure that the UpdateState message we receive is consistent 690 // Now ensure that the UpdateState message we receive is consistent
689 // and represents page C in both page_id and state. 691 // and represents page C in both page_id and state.
690 const IPC::Message* msg = render_thread_->sink().GetUniqueMessageMatching( 692 const IPC::Message* msg = render_thread_->sink().GetUniqueMessageMatching(
691 ViewHostMsg_UpdateState::ID); 693 ViewHostMsg_UpdateState::ID);
692 ASSERT_TRUE(msg); 694 ASSERT_TRUE(msg);
693 int page_id; 695 ViewHostMsg_UpdateState::Read(msg, &param);
694 PageState state; 696 int page_id = param.a;
695 ViewHostMsg_UpdateState::Read(msg, &page_id, &state); 697 PageState state = param.b;
696 EXPECT_EQ(page_id_C, page_id); 698 EXPECT_EQ(page_id_C, page_id);
697 EXPECT_NE(state_A, state); 699 EXPECT_NE(state_A, state);
698 EXPECT_NE(state_B, state); 700 EXPECT_NE(state_B, state);
699 EXPECT_EQ(state_C, state); 701 EXPECT_EQ(state_C, state);
700 } 702 }
701 703
702 // Test that the history_page_ids_ list can reveal when a stale back/forward 704 // Test that the history_page_ids_ list can reveal when a stale back/forward
703 // navigation arrives from the browser and can be ignored. See 705 // navigation arrives from the browser and can be ignored. See
704 // http://crbug.com/86758. 706 // http://crbug.com/86758.
705 TEST_F(RenderViewImplTest, StaleNavigationsIgnored) { 707 TEST_F(RenderViewImplTest, StaleNavigationsIgnored) {
706 // Load page A. 708 // Load page A.
707 LoadHTML("<div>Page A</div>"); 709 LoadHTML("<div>Page A</div>");
708 EXPECT_EQ(1, view()->history_list_length_); 710 EXPECT_EQ(1, view()->history_list_length_);
709 EXPECT_EQ(0, view()->history_list_offset_); 711 EXPECT_EQ(0, view()->history_list_offset_);
710 EXPECT_EQ(1, view()->history_page_ids_[0]); 712 EXPECT_EQ(1, view()->history_page_ids_[0]);
711 713
712 // Load page B, which will trigger an UpdateState message for page A. 714 // Load page B, which will trigger an UpdateState message for page A.
713 LoadHTML("<div>Page B</div>"); 715 LoadHTML("<div>Page B</div>");
714 EXPECT_EQ(2, view()->history_list_length_); 716 EXPECT_EQ(2, view()->history_list_length_);
715 EXPECT_EQ(1, view()->history_list_offset_); 717 EXPECT_EQ(1, view()->history_list_offset_);
716 EXPECT_EQ(2, view()->history_page_ids_[1]); 718 EXPECT_EQ(2, view()->history_page_ids_[1]);
717 719
718 // Check for a valid UpdateState message for page A. 720 // Check for a valid UpdateState message for page A.
719 ProcessPendingMessages(); 721 ProcessPendingMessages();
720 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching( 722 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching(
721 ViewHostMsg_UpdateState::ID); 723 ViewHostMsg_UpdateState::ID);
722 ASSERT_TRUE(msg_A); 724 ASSERT_TRUE(msg_A);
723 int page_id_A; 725 ViewHostMsg_UpdateState::Param param;
724 PageState state_A; 726 ViewHostMsg_UpdateState::Read(msg_A, &param);
725 ViewHostMsg_UpdateState::Read(msg_A, &page_id_A, &state_A); 727 int page_id_A = param.a;
728 PageState state_A = param.b;
726 EXPECT_EQ(1, page_id_A); 729 EXPECT_EQ(1, page_id_A);
727 render_thread_->sink().ClearMessages(); 730 render_thread_->sink().ClearMessages();
728 731
729 // Back to page A (page_id 1) and commit. 732 // Back to page A (page_id 1) and commit.
730 FrameMsg_Navigate_Params params_A; 733 FrameMsg_Navigate_Params params_A;
731 params_A.navigation_type = FrameMsg_Navigate_Type::NORMAL; 734 params_A.navigation_type = FrameMsg_Navigate_Type::NORMAL;
732 params_A.transition = PAGE_TRANSITION_FORWARD_BACK; 735 params_A.transition = PAGE_TRANSITION_FORWARD_BACK;
733 params_A.current_history_list_length = 2; 736 params_A.current_history_list_length = 2;
734 params_A.current_history_list_offset = 1; 737 params_A.current_history_list_offset = 1;
735 params_A.pending_history_list_offset = 0; 738 params_A.pending_history_list_offset = 0;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 LoadHTML("<div>Page B</div>"); 781 LoadHTML("<div>Page B</div>");
779 EXPECT_EQ(2, view()->history_list_length_); 782 EXPECT_EQ(2, view()->history_list_length_);
780 EXPECT_EQ(1, view()->history_list_offset_); 783 EXPECT_EQ(1, view()->history_list_offset_);
781 EXPECT_EQ(2, view()->history_page_ids_[1]); 784 EXPECT_EQ(2, view()->history_page_ids_[1]);
782 785
783 // Check for a valid UpdateState message for page A. 786 // Check for a valid UpdateState message for page A.
784 ProcessPendingMessages(); 787 ProcessPendingMessages();
785 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching( 788 const IPC::Message* msg_A = render_thread_->sink().GetUniqueMessageMatching(
786 ViewHostMsg_UpdateState::ID); 789 ViewHostMsg_UpdateState::ID);
787 ASSERT_TRUE(msg_A); 790 ASSERT_TRUE(msg_A);
788 int page_id_A; 791 ViewHostMsg_UpdateState::Param param;
789 PageState state_A; 792 ViewHostMsg_UpdateState::Read(msg_A, &param);
790 ViewHostMsg_UpdateState::Read(msg_A, &page_id_A, &state_A); 793 int page_id_A = param.a;
794 PageState state_A = param.b;
791 EXPECT_EQ(1, page_id_A); 795 EXPECT_EQ(1, page_id_A);
792 render_thread_->sink().ClearMessages(); 796 render_thread_->sink().ClearMessages();
793 797
794 // Load page C, which will trigger an UpdateState message for page B. 798 // Load page C, which will trigger an UpdateState message for page B.
795 LoadHTML("<div>Page C</div>"); 799 LoadHTML("<div>Page C</div>");
796 EXPECT_EQ(3, view()->history_list_length_); 800 EXPECT_EQ(3, view()->history_list_length_);
797 EXPECT_EQ(2, view()->history_list_offset_); 801 EXPECT_EQ(2, view()->history_list_offset_);
798 EXPECT_EQ(3, view()->history_page_ids_[2]); 802 EXPECT_EQ(3, view()->history_page_ids_[2]);
799 803
800 // Check for a valid UpdateState message for page B. 804 // Check for a valid UpdateState message for page B.
801 ProcessPendingMessages(); 805 ProcessPendingMessages();
802 const IPC::Message* msg_B = render_thread_->sink().GetUniqueMessageMatching( 806 const IPC::Message* msg_B = render_thread_->sink().GetUniqueMessageMatching(
803 ViewHostMsg_UpdateState::ID); 807 ViewHostMsg_UpdateState::ID);
804 ASSERT_TRUE(msg_B); 808 ASSERT_TRUE(msg_B);
805 int page_id_B; 809 ViewHostMsg_UpdateState::Read(msg_B, &param);
806 PageState state_B; 810 int page_id_B = param.a;
807 ViewHostMsg_UpdateState::Read(msg_B, &page_id_B, &state_B); 811 PageState state_B = param.b;
808 EXPECT_EQ(2, page_id_B); 812 EXPECT_EQ(2, page_id_B);
809 render_thread_->sink().ClearMessages(); 813 render_thread_->sink().ClearMessages();
810 814
811 // Suppose the browser has limited the number of NavigationEntries to 2. 815 // Suppose the browser has limited the number of NavigationEntries to 2.
812 // It has now dropped the first entry, but the renderer isn't notified. 816 // It has now dropped the first entry, but the renderer isn't notified.
813 // Ensure that going back to page B (page_id 2) at offset 0 is successful. 817 // Ensure that going back to page B (page_id 2) at offset 0 is successful.
814 FrameMsg_Navigate_Params params_B; 818 FrameMsg_Navigate_Params params_B;
815 params_B.navigation_type = FrameMsg_Navigate_Type::NORMAL; 819 params_B.navigation_type = FrameMsg_Navigate_Type::NORMAL;
816 params_B.transition = PAGE_TRANSITION_FORWARD_BACK; 820 params_B.transition = PAGE_TRANSITION_FORWARD_BACK;
817 params_B.current_history_list_length = 2; 821 params_B.current_history_list_length = 2;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 ExecuteJavaScript("document.getElementById('test1').focus();"); 892 ExecuteJavaScript("document.getElementById('test1').focus();");
889 ProcessPendingMessages(); 893 ProcessPendingMessages();
890 render_thread_->sink().ClearMessages(); 894 render_thread_->sink().ClearMessages();
891 895
892 // Update the IME status and verify if our IME backend sends an IPC message 896 // Update the IME status and verify if our IME backend sends an IPC message
893 // to activate IMEs. 897 // to activate IMEs.
894 view()->UpdateTextInputType(); 898 view()->UpdateTextInputType();
895 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); 899 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0);
896 EXPECT_TRUE(msg != NULL); 900 EXPECT_TRUE(msg != NULL);
897 EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type()); 901 EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type());
898 ui::TextInputType type; 902 ViewHostMsg_TextInputTypeChanged::Param params;
899 bool can_compose_inline = false; 903 ViewHostMsg_TextInputTypeChanged::Read(msg, &params);
900 ui::TextInputMode input_mode = ui::TEXT_INPUT_MODE_DEFAULT; 904 ui::TextInputType type = params.a;
901 ViewHostMsg_TextInputTypeChanged::Read(msg, 905 ui::TextInputMode input_mode = params.b;
902 &type, 906 bool can_compose_inline = params.c;
903 &input_mode,
904 &can_compose_inline);
905 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type); 907 EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type);
906 EXPECT_EQ(true, can_compose_inline); 908 EXPECT_EQ(true, can_compose_inline);
907 909
908 // Move the input focus to the second <input> element, where we should 910 // Move the input focus to the second <input> element, where we should
909 // de-activate IMEs. 911 // de-activate IMEs.
910 ExecuteJavaScript("document.getElementById('test2').focus();"); 912 ExecuteJavaScript("document.getElementById('test2').focus();");
911 ProcessPendingMessages(); 913 ProcessPendingMessages();
912 render_thread_->sink().ClearMessages(); 914 render_thread_->sink().ClearMessages();
913 915
914 // Update the IME status and verify if our IME backend sends an IPC message 916 // Update the IME status and verify if our IME backend sends an IPC message
915 // to de-activate IMEs. 917 // to de-activate IMEs.
916 view()->UpdateTextInputType(); 918 view()->UpdateTextInputType();
917 msg = render_thread_->sink().GetMessageAt(0); 919 msg = render_thread_->sink().GetMessageAt(0);
918 EXPECT_TRUE(msg != NULL); 920 EXPECT_TRUE(msg != NULL);
919 EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type()); 921 EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type());
920 ViewHostMsg_TextInputTypeChanged::Read(msg, 922 ViewHostMsg_TextInputTypeChanged::Read(msg, & params);
921 &type, 923 type = params.a;
922 &input_mode, 924 input_mode = params.b;
923 &can_compose_inline);
924 EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, type); 925 EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, type);
925 926
926 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kInputModeTestCases); i++) { 927 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kInputModeTestCases); i++) {
927 const InputModeTestCase* test_case = &kInputModeTestCases[i]; 928 const InputModeTestCase* test_case = &kInputModeTestCases[i];
928 std::string javascript = 929 std::string javascript =
929 base::StringPrintf("document.getElementById('%s').focus();", 930 base::StringPrintf("document.getElementById('%s').focus();",
930 test_case->input_id); 931 test_case->input_id);
931 // Move the input focus to the target <input> element, where we should 932 // Move the input focus to the target <input> element, where we should
932 // activate IMEs. 933 // activate IMEs.
933 ExecuteJavaScriptAndReturnIntValue(base::ASCIIToUTF16(javascript), NULL); 934 ExecuteJavaScriptAndReturnIntValue(base::ASCIIToUTF16(javascript), NULL);
934 ProcessPendingMessages(); 935 ProcessPendingMessages();
935 render_thread_->sink().ClearMessages(); 936 render_thread_->sink().ClearMessages();
936 937
937 // Update the IME status and verify if our IME backend sends an IPC 938 // Update the IME status and verify if our IME backend sends an IPC
938 // message to activate IMEs. 939 // message to activate IMEs.
939 view()->UpdateTextInputType(); 940 view()->UpdateTextInputType();
940 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0); 941 const IPC::Message* msg = render_thread_->sink().GetMessageAt(0);
941 EXPECT_TRUE(msg != NULL); 942 EXPECT_TRUE(msg != NULL);
942 EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type()); 943 EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type());
943 ViewHostMsg_TextInputTypeChanged::Read(msg, 944 ViewHostMsg_TextInputTypeChanged::Read(msg, & params);
944 &type, 945 type = params.a;
945 &input_mode, 946 input_mode = params.b;
946 &can_compose_inline);
947 EXPECT_EQ(test_case->expected_mode, input_mode); 947 EXPECT_EQ(test_case->expected_mode, input_mode);
948 } 948 }
949 } 949 }
950 } 950 }
951 951
952 // Test that our IME backend can compose CJK words. 952 // Test that our IME backend can compose CJK words.
953 // Our IME front-end sends many platform-independent messages to the IME backend 953 // Our IME front-end sends many platform-independent messages to the IME backend
954 // while it composes CJK words. This test sends the minimal messages captured 954 // while it composes CJK words. This test sends the minimal messages captured
955 // on my local environment directly to the IME backend to verify if the backend 955 // on my local environment directly to the IME backend to verify if the backend
956 // can compose CJK words without any problems. 956 // can compose CJK words without any problems.
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 view()->renderer_accessibility()->GetType()); 2361 view()->renderer_accessibility()->GetType());
2362 2362
2363 view()->OnSetAccessibilityMode(AccessibilityModeEditableTextOnly); 2363 view()->OnSetAccessibilityMode(AccessibilityModeEditableTextOnly);
2364 ASSERT_EQ(AccessibilityModeEditableTextOnly, view()->accessibility_mode()); 2364 ASSERT_EQ(AccessibilityModeEditableTextOnly, view()->accessibility_mode());
2365 ASSERT_NE((RendererAccessibility*) NULL, view()->renderer_accessibility()); 2365 ASSERT_NE((RendererAccessibility*) NULL, view()->renderer_accessibility());
2366 ASSERT_EQ(RendererAccessibilityTypeFocusOnly, 2366 ASSERT_EQ(RendererAccessibilityTypeFocusOnly,
2367 view()->renderer_accessibility()->GetType()); 2367 view()->renderer_accessibility()->GetType());
2368 } 2368 }
2369 2369
2370 } // namespace content 2370 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_event_filter_unittest.cc ('k') | content/renderer/render_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698