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

Side by Side Diff: chrome/browser/apps/web_view_browsertest.cc

Issue 60273002: <webview>: Cleanup tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/web_view/content_script_whitelisted/main.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/ui/native_app_window.h" 5 #include "apps/ui/native_app_window.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 9 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "chrome/browser/automation/automation_util.h" 10 #include "chrome/browser/automation/automation_util.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 const net::test_server::HttpRequest& request) { 476 const net::test_server::HttpRequest& request) {
477 if (StartsWithASCII(path, request.relative_url, true)) { 477 if (StartsWithASCII(path, request.relative_url, true)) {
478 return scoped_ptr<net::test_server::HttpResponse>( 478 return scoped_ptr<net::test_server::HttpResponse>(
479 new EmptyHttpResponse); 479 new EmptyHttpResponse);
480 } 480 }
481 481
482 return scoped_ptr<net::test_server::HttpResponse>(); 482 return scoped_ptr<net::test_server::HttpResponse>();
483 } 483 }
484 484
485 void TestHelper(const std::string& test_name, 485 void TestHelper(const std::string& test_name,
486 const std::string& test_passed_msg,
487 const std::string& test_failed_msg,
488 const std::string& app_location) { 486 const std::string& app_location) {
489 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages. 487 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages.
490 ExtensionTestMessageListener launched_listener("Launched", false); 488 ExtensionTestMessageListener launched_listener("Launched", false);
491 LoadAndLaunchPlatformApp(app_location.c_str()); 489 LoadAndLaunchPlatformApp(app_location.c_str());
492 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 490 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
493 491
494 embedded_test_server()->RegisterRequestHandler( 492 embedded_test_server()->RegisterRequestHandler(
495 base::Bind(&WebViewTest::RedirectResponseHandler, 493 base::Bind(&WebViewTest::RedirectResponseHandler,
496 kRedirectResponsePath, 494 kRedirectResponsePath,
497 embedded_test_server()->GetURL(kRedirectResponseFullPath))); 495 embedded_test_server()->GetURL(kRedirectResponseFullPath)));
498 496
499 embedded_test_server()->RegisterRequestHandler( 497 embedded_test_server()->RegisterRequestHandler(
500 base::Bind(&WebViewTest::EmptyResponseHandler, kEmptyResponsePath)); 498 base::Bind(&WebViewTest::EmptyResponseHandler, kEmptyResponsePath));
501 499
502 content::WebContents* embedder_web_contents = 500 content::WebContents* embedder_web_contents =
503 GetFirstShellWindowWebContents(); 501 GetFirstShellWindowWebContents();
504 ASSERT_TRUE(embedder_web_contents); 502 ASSERT_TRUE(embedder_web_contents);
505 503
506 ExtensionTestMessageListener done_listener(test_passed_msg, false); 504 ExtensionTestMessageListener done_listener("TEST_PASSED", false);
507 done_listener.AlsoListenForFailureMessage(test_failed_msg); 505 done_listener.AlsoListenForFailureMessage("TEST_FAILED");
508 EXPECT_TRUE(content::ExecuteScript( 506 EXPECT_TRUE(content::ExecuteScript(
509 embedder_web_contents, 507 embedder_web_contents,
510 base::StringPrintf("runTest('%s')", test_name.c_str()))); 508 base::StringPrintf("runTest('%s')", test_name.c_str())));
511 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); 509 ASSERT_TRUE(done_listener.WaitUntilSatisfied());
512 } 510 }
513 511
514 content::WebContents* LoadGuest(const std::string& guest_path, 512 content::WebContents* LoadGuest(const std::string& guest_path,
515 const std::string& app_path) { 513 const std::string& app_path) {
516 GURL::Replacements replace_host; 514 GURL::Replacements replace_host;
517 std::string host_str("localhost"); // Must stay in scope with replace_host. 515 std::string host_str("localhost"); // Must stay in scope with replace_host.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // Flaky on XP bot http://crbug.com/299507 614 // Flaky on XP bot http://crbug.com/299507
617 if (base::win::GetVersion() <= base::win::VERSION_XP) 615 if (base::win::GetVersion() <= base::win::VERSION_XP)
618 return; 616 return;
619 #endif 617 #endif
620 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize")) 618 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize"))
621 << message_; 619 << message_;
622 } 620 }
623 #endif 621 #endif
624 622
625 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeAfterNavigation) { 623 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeAfterNavigation) {
626 TestHelper("testAutosizeAfterNavigation", 624 TestHelper("testAutosizeAfterNavigation", "web_view/shim");
627 "DoneShimTest.PASSED",
628 "DoneShimTest.FAILED",
629 "web_view/shim");
630 } 625 }
631 626
632 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeBeforeNavigation) { 627 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeBeforeNavigation) {
633 TestHelper("testAutosizeBeforeNavigation", 628 TestHelper("testAutosizeBeforeNavigation", "web_view/shim");
634 "DoneShimTest.PASSED",
635 "DoneShimTest.FAILED",
636 "web_view/shim");
637 } 629 }
638 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeRemoveAttributes) { 630 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeRemoveAttributes) {
639 TestHelper("testAutosizeRemoveAttributes", 631 TestHelper("testAutosizeRemoveAttributes", "web_view/shim");
640 "DoneShimTest.PASSED",
641 "DoneShimTest.FAILED",
642 "web_view/shim");
643 } 632 }
644 633
645 // This test is disabled due to being flaky. http://crbug.com/282116 634 // This test is disabled due to being flaky. http://crbug.com/282116
646 #if defined(OS_WIN) 635 #if defined(OS_WIN)
647 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \ 636 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \
648 DISABLED_Shim_TestAutosizeWithPartialAttributes 637 DISABLED_Shim_TestAutosizeWithPartialAttributes
649 #else 638 #else
650 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \ 639 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \
651 Shim_TestAutosizeWithPartialAttributes 640 Shim_TestAutosizeWithPartialAttributes
652 #endif 641 #endif
653 IN_PROC_BROWSER_TEST_F(WebViewTest, 642 IN_PROC_BROWSER_TEST_F(WebViewTest,
654 MAYBE_Shim_TestAutosizeWithPartialAttributes) { 643 MAYBE_Shim_TestAutosizeWithPartialAttributes) {
655 TestHelper("testAutosizeWithPartialAttributes", 644 TestHelper("testAutosizeWithPartialAttributes", "web_view/shim");
656 "DoneShimTest.PASSED",
657 "DoneShimTest.FAILED",
658 "web_view/shim");
659 } 645 }
660 646
661 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAPIMethodExistence) { 647 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAPIMethodExistence) {
662 TestHelper("testAPIMethodExistence", 648 TestHelper("testAPIMethodExistence", "web_view/shim");
663 "DoneShimTest.PASSED",
664 "DoneShimTest.FAILED",
665 "web_view/shim");
666 } 649 }
667 650
668 // Tests the existence of WebRequest API event objects on the request 651 // Tests the existence of WebRequest API event objects on the request
669 // object, on the webview element, and hanging directly off webview. 652 // object, on the webview element, and hanging directly off webview.
670 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIExistence) { 653 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIExistence) {
671 TestHelper("testWebRequestAPIExistence", 654 TestHelper("testWebRequestAPIExistence", "web_view/shim");
672 "DoneShimTest.PASSED",
673 "DoneShimTest.FAILED",
674 "web_view/shim");
675 } 655 }
676 656
677 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionURL) { 657 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionURL) {
678 TestHelper("testChromeExtensionURL", 658 TestHelper("testChromeExtensionURL", "web_view/shim");
679 "DoneShimTest.PASSED",
680 "DoneShimTest.FAILED",
681 "web_view/shim");
682 } 659 }
683 660
684 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionRelativePath) { 661 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionRelativePath) {
685 TestHelper("testChromeExtensionRelativePath", 662 TestHelper("testChromeExtensionRelativePath", "web_view/shim");
686 "DoneShimTest.PASSED",
687 "DoneShimTest.FAILED",
688 "web_view/shim");
689 } 663 }
690 664
691 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestInvalidChromeExtensionURL) { 665 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestInvalidChromeExtensionURL) {
692 TestHelper("testInvalidChromeExtensionURL", 666 TestHelper("testInvalidChromeExtensionURL", "web_view/shim");
693 "DoneShimTest.PASSED",
694 "DoneShimTest.FAILED",
695 "web_view/shim");
696 } 667 }
697 668
698 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestEventName) { 669 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestEventName) {
699 TestHelper("testEventName", 670 TestHelper("testEventName", "web_view/shim");
700 "DoneShimTest.PASSED",
701 "DoneShimTest.FAILED",
702 "web_view/shim");
703 } 671 }
704 672
705 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestOnEventProperty) { 673 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestOnEventProperty) {
706 TestHelper("testOnEventProperties", 674 TestHelper("testOnEventProperties", "web_view/shim");
707 "DoneShimTest.PASSED",
708 "DoneShimTest.FAILED",
709 "web_view/shim");
710 } 675 }
711 676
712 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadProgressEvent) { 677 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadProgressEvent) {
713 TestHelper("testLoadProgressEvent", 678 TestHelper("testLoadProgressEvent", "web_view/shim");
714 "DoneShimTest.PASSED",
715 "DoneShimTest.FAILED",
716 "web_view/shim");
717 } 679 }
718 680
719 // WebViewTest.Shim_TestDestroyOnEventListener is flaky, so disable it. 681 // WebViewTest.Shim_TestDestroyOnEventListener is flaky, so disable it.
720 // http://crbug.com/255106 682 // http://crbug.com/255106
721 IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestDestroyOnEventListener) { 683 IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestDestroyOnEventListener) {
722 TestHelper("testDestroyOnEventListener", 684 TestHelper("testDestroyOnEventListener", "web_view/shim");
723 "DoneShimTest.PASSED",
724 "DoneShimTest.FAILED",
725 "web_view/shim");
726 } 685 }
727 686
728 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestCannotMutateEventName) { 687 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestCannotMutateEventName) {
729 TestHelper("testCannotMutateEventName", 688 TestHelper("testCannotMutateEventName", "web_view/shim");
730 "DoneShimTest.PASSED",
731 "DoneShimTest.FAILED",
732 "web_view/shim");
733 } 689 }
734 690
735 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestPartitionRaisesException) { 691 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestPartitionRaisesException) {
736 #if defined(OS_WIN) 692 #if defined(OS_WIN)
737 // Flaky on XP bot http://crbug.com/267304 693 // Flaky on XP bot http://crbug.com/267304
738 if (base::win::GetVersion() <= base::win::VERSION_XP) 694 if (base::win::GetVersion() <= base::win::VERSION_XP)
739 return; 695 return;
740 #endif 696 #endif
741 697
742 TestHelper("testPartitionRaisesException", 698 TestHelper("testPartitionRaisesException", "web_view/shim");
743 "DoneShimTest.PASSED",
744 "DoneShimTest.FAILED",
745 "web_view/shim");
746 } 699 }
747 700
748 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) { 701 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScriptFail) {
749 #if defined(OS_WIN) 702 #if defined(OS_WIN)
750 // Flaky on XP bot http://crbug.com/266185 703 // Flaky on XP bot http://crbug.com/266185
751 if (base::win::GetVersion() <= base::win::VERSION_XP) 704 if (base::win::GetVersion() <= base::win::VERSION_XP)
752 return; 705 return;
753 #endif 706 #endif
754 707
755 TestHelper("testExecuteScriptFail", 708 TestHelper("testExecuteScriptFail", "web_view/shim");
756 "DoneShimTest.PASSED",
757 "DoneShimTest.FAILED",
758 "web_view/shim");
759 } 709 }
760 710
761 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScript) { 711 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestExecuteScript) {
762 TestHelper("testExecuteScript", 712 TestHelper("testExecuteScript", "web_view/shim");
763 "DoneShimTest.PASSED",
764 "DoneShimTest.FAILED",
765 "web_view/shim");
766 } 713 }
767 714
768 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestTerminateAfterExit) { 715 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestTerminateAfterExit) {
769 TestHelper("testTerminateAfterExit", 716 TestHelper("testTerminateAfterExit", "web_view/shim");
770 "DoneShimTest.PASSED",
771 "DoneShimTest.FAILED",
772 "web_view/shim");
773 } 717 }
774 718
775 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAssignSrcAfterCrash) { 719 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAssignSrcAfterCrash) {
776 TestHelper("testAssignSrcAfterCrash", 720 TestHelper("testAssignSrcAfterCrash", "web_view/shim");
777 "DoneShimTest.PASSED",
778 "DoneShimTest.FAILED",
779 "web_view/shim");
780 } 721 }
781 722
782 IN_PROC_BROWSER_TEST_F(WebViewTest, 723 IN_PROC_BROWSER_TEST_F(WebViewTest,
783 Shim_TestNavOnConsecutiveSrcAttributeChanges) { 724 Shim_TestNavOnConsecutiveSrcAttributeChanges) {
784 TestHelper("testNavOnConsecutiveSrcAttributeChanges", 725 TestHelper("testNavOnConsecutiveSrcAttributeChanges", "web_view/shim");
785 "DoneShimTest.PASSED",
786 "DoneShimTest.FAILED",
787 "web_view/shim");
788 } 726 }
789 727
790 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavOnSrcAttributeChange) { 728 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavOnSrcAttributeChange) {
791 TestHelper("testNavOnSrcAttributeChange", 729 TestHelper("testNavOnSrcAttributeChange", "web_view/shim");
792 "DoneShimTest.PASSED",
793 "DoneShimTest.FAILED",
794 "web_view/shim");
795 } 730 }
796 731
797 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveSrcAttribute) { 732 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveSrcAttribute) {
798 TestHelper("testRemoveSrcAttribute", 733 TestHelper("testRemoveSrcAttribute", "web_view/shim");
799 "DoneShimTest.PASSED",
800 "DoneShimTest.FAILED",
801 "web_view/shim");
802 } 734 }
803 735
804 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReassignSrcAttribute) { 736 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReassignSrcAttribute) {
805 TestHelper("testReassignSrcAttribute", 737 TestHelper("testReassignSrcAttribute", "web_view/shim");
806 "DoneShimTest.PASSED",
807 "DoneShimTest.FAILED",
808 "web_view/shim");
809 } 738 }
810 739
811 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestBrowserPluginNotAllowed) { 740 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestBrowserPluginNotAllowed) {
812 #if defined(OS_WIN) 741 #if defined(OS_WIN)
813 // Flaky on XP bots. http://crbug.com/267300 742 // Flaky on XP bots. http://crbug.com/267300
814 if (base::win::GetVersion() <= base::win::VERSION_XP) 743 if (base::win::GetVersion() <= base::win::VERSION_XP)
815 return; 744 return;
816 #endif 745 #endif
817 746
818 TestHelper("testBrowserPluginNotAllowed", 747 TestHelper("testBrowserPluginNotAllowed", "web_view/shim");
819 "DoneShimTest.PASSED",
820 "DoneShimTest.FAILED",
821 "web_view/shim");
822 } 748 }
823 749
824 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindow) { 750 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindow) {
825 TestHelper("testNewWindow", 751 TestHelper("testNewWindow", "web_view/shim");
826 "DoneShimTest.PASSED",
827 "DoneShimTest.FAILED",
828 "web_view/shim");
829 } 752 }
830 753
831 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindowTwoListeners) { 754 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindowTwoListeners) {
832 TestHelper("testNewWindowTwoListeners", 755 TestHelper("testNewWindowTwoListeners", "web_view/shim");
833 "DoneShimTest.PASSED",
834 "DoneShimTest.FAILED",
835 "web_view/shim");
836 } 756 }
837 757
838 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindowNoPreventDefault) { 758 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindowNoPreventDefault) {
839 TestHelper("testNewWindowNoPreventDefault", 759 TestHelper("testNewWindowNoPreventDefault", "web_view/shim");
840 "DoneShimTest.PASSED",
841 "DoneShimTest.FAILED",
842 "web_view/shim");
843 } 760 }
844 761
845 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindowNoReferrerLink) { 762 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNewWindowNoReferrerLink) {
846 TestHelper("testNewWindowNoReferrerLink", 763 TestHelper("testNewWindowNoReferrerLink", "web_view/shim");
847 "DoneShimTest.PASSED",
848 "DoneShimTest.FAILED",
849 "web_view/shim");
850 } 764 }
851 765
852 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestContentLoadEvent) { 766 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestContentLoadEvent) {
853 TestHelper("testContentLoadEvent", 767 TestHelper("testContentLoadEvent", "web_view/shim");
854 "DoneShimTest.PASSED",
855 "DoneShimTest.FAILED",
856 "web_view/shim");
857 } 768 }
858 769
859 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPI) { 770 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPI) {
860 TestHelper("testWebRequestAPI", 771 TestHelper("testWebRequestAPI", "web_view/shim");
861 "DoneShimTest.PASSED",
862 "DoneShimTest.FAILED",
863 "web_view/shim");
864 } 772 }
865 773
866 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIGoogleProperty) { 774 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIGoogleProperty) {
867 TestHelper("testWebRequestAPIGoogleProperty", 775 TestHelper("testWebRequestAPIGoogleProperty", "web_view/shim");
868 "DoneShimTest.PASSED",
869 "DoneShimTest.FAILED",
870 "web_view/shim");
871 } 776 }
872 777
873 // This test is disabled due to being flaky. http://crbug.com/309451 778 // This test is disabled due to being flaky. http://crbug.com/309451
874 #if defined(OS_WIN) 779 #if defined(OS_WIN)
875 #define MAYBE_Shim_TestWebRequestListenerSurvivesReparenting \ 780 #define MAYBE_Shim_TestWebRequestListenerSurvivesReparenting \
876 DISABLED_Shim_TestWebRequestListenerSurvivesReparenting 781 DISABLED_Shim_TestWebRequestListenerSurvivesReparenting
877 #else 782 #else
878 #define MAYBE_Shim_TestWebRequestListenerSurvivesReparenting \ 783 #define MAYBE_Shim_TestWebRequestListenerSurvivesReparenting \
879 Shim_TestWebRequestListenerSurvivesReparenting 784 Shim_TestWebRequestListenerSurvivesReparenting
880 #endif 785 #endif
881 IN_PROC_BROWSER_TEST_F( 786 IN_PROC_BROWSER_TEST_F(
882 WebViewTest, 787 WebViewTest,
883 MAYBE_Shim_TestWebRequestListenerSurvivesReparenting) { 788 MAYBE_Shim_TestWebRequestListenerSurvivesReparenting) {
884 TestHelper("testWebRequestListenerSurvivesReparenting", 789 TestHelper("testWebRequestListenerSurvivesReparenting", "web_view/shim");
885 "DoneShimTest.PASSED",
886 "DoneShimTest.FAILED",
887 "web_view/shim");
888 } 790 }
889 791
890 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadStartLoadRedirect) { 792 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadStartLoadRedirect) {
891 TestHelper("testLoadStartLoadRedirect", 793 TestHelper("testLoadStartLoadRedirect", "web_view/shim");
892 "DoneShimTest.PASSED",
893 "DoneShimTest.FAILED",
894 "web_view/shim");
895 } 794 }
896 795
897 IN_PROC_BROWSER_TEST_F(WebViewTest, 796 IN_PROC_BROWSER_TEST_F(WebViewTest,
898 Shim_TestLoadAbortChromeExtensionURLWrongPartition) { 797 Shim_TestLoadAbortChromeExtensionURLWrongPartition) {
899 TestHelper("testLoadAbortChromeExtensionURLWrongPartition", 798 TestHelper("testLoadAbortChromeExtensionURLWrongPartition", "web_view/shim");
900 "DoneShimTest.PASSED",
901 "DoneShimTest.FAILED",
902 "web_view/shim");
903 } 799 }
904 800
905 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortEmptyResponse) { 801 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortEmptyResponse) {
906 TestHelper("testLoadAbortEmptyResponse", 802 TestHelper("testLoadAbortEmptyResponse", "web_view/shim");
907 "DoneShimTest.PASSED",
908 "DoneShimTest.FAILED",
909 "web_view/shim");
910 } 803 }
911 804
912 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalChromeURL) { 805 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalChromeURL) {
913 TestHelper("testLoadAbortIllegalChromeURL", 806 TestHelper("testLoadAbortIllegalChromeURL", "web_view/shim");
914 "DoneShimTest.PASSED",
915 "DoneShimTest.FAILED",
916 "web_view/shim");
917 } 807 }
918 808
919 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalFileURL) { 809 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalFileURL) {
920 TestHelper("testLoadAbortIllegalFileURL", 810 TestHelper("testLoadAbortIllegalFileURL", "web_view/shim");
921 "DoneShimTest.PASSED",
922 "DoneShimTest.FAILED",
923 "web_view/shim");
924 } 811 }
925 812
926 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalJavaScriptURL) { 813 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortIllegalJavaScriptURL) {
927 TestHelper("testLoadAbortIllegalJavaScriptURL", 814 TestHelper("testLoadAbortIllegalJavaScriptURL", "web_view/shim");
928 "DoneShimTest.PASSED",
929 "DoneShimTest.FAILED",
930 "web_view/shim");
931 } 815 }
932 816
933 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReload) { 817 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestReload) {
934 TestHelper("testReload", 818 TestHelper("testReload", "web_view/shim");
935 "DoneShimTest.PASSED",
936 "DoneShimTest.FAILED",
937 "web_view/shim");
938 } 819 }
939 820
940 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGetProcessId) { 821 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGetProcessId) {
941 TestHelper("testGetProcessId", 822 TestHelper("testGetProcessId", "web_view/shim");
942 "DoneShimTest.PASSED",
943 "DoneShimTest.FAILED",
944 "web_view/shim");
945 } 823 }
946 824
947 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewOnExit) { 825 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewOnExit) {
948 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages. 826 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages.
949 827
950 // Launch the app and wait until it's ready to load a test. 828 // Launch the app and wait until it's ready to load a test.
951 ExtensionTestMessageListener launched_listener("Launched", false); 829 ExtensionTestMessageListener launched_listener("Launched", false);
952 LoadAndLaunchPlatformApp("web_view/shim"); 830 LoadAndLaunchPlatformApp("web_view/shim");
953 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 831 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
954 832
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 embedder_web_contents, 868 embedder_web_contents,
991 "removeWebviewOnExitDoCrash();")); 869 "removeWebviewOnExitDoCrash();"));
992 870
993 // Wait until the guest WebContents is destroyed. 871 // Wait until the guest WebContents is destroyed.
994 destroyed_watcher.Wait(); 872 destroyed_watcher.Wait();
995 } 873 }
996 874
997 // Remove <webview> immediately after navigating it. 875 // Remove <webview> immediately after navigating it.
998 // This is a regression test for http://crbug.com/276023. 876 // This is a regression test for http://crbug.com/276023.
999 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewAfterNavigation) { 877 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestRemoveWebviewAfterNavigation) {
1000 TestHelper("testRemoveWebviewAfterNavigation", 878 TestHelper("testRemoveWebviewAfterNavigation", "web_view/shim");
1001 "DoneShimTest.PASSED",
1002 "DoneShimTest.FAILED",
1003 "web_view/shim");
1004 } 879 }
1005 880
1006 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavigationToExternalProtocol) { 881 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavigationToExternalProtocol) {
1007 TestHelper("testNavigationToExternalProtocol", 882 TestHelper("testNavigationToExternalProtocol", "web_view/shim");
1008 "DoneShimTest.PASSED",
1009 "DoneShimTest.FAILED",
1010 "web_view/shim");
1011 } 883 }
1012 884
1013 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestResizeWebviewResizesContent) { 885 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestResizeWebviewResizesContent) {
1014 TestHelper("testResizeWebviewResizesContent", 886 TestHelper("testResizeWebviewResizesContent", "web_view/shim");
1015 "DoneShimTest.PASSED",
1016 "DoneShimTest.FAILED",
1017 "web_view/shim");
1018 } 887 }
1019 888
1020 // This test makes sure we do not crash if app is closed while interstitial 889 // This test makes sure we do not crash if app is closed while interstitial
1021 // page is being shown in guest. 890 // page is being shown in guest.
1022 // Test flaky on windows; http://crbug.com/297014 . 891 // Test flaky on windows; http://crbug.com/297014 .
1023 #if defined(OS_WIN) 892 #if defined(OS_WIN)
1024 #define MAYBE_InterstitialTeardown DISABLED_InterstitialTeardown 893 #define MAYBE_InterstitialTeardown DISABLED_InterstitialTeardown
1025 #else 894 #else
1026 #define MAYBE_InterstitialTeardown InterstitialTeardown 895 #define MAYBE_InterstitialTeardown InterstitialTeardown
1027 #endif 896 #endif
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 ExtensionTestMessageListener launched_listener("Launched", false); 1409 ExtensionTestMessageListener launched_listener("Launched", false);
1541 LoadAndLaunchPlatformApp("web_view/media_access/allow"); 1410 LoadAndLaunchPlatformApp("web_view/media_access/allow");
1542 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 1411 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1543 1412
1544 content::WebContents* embedder_web_contents = 1413 content::WebContents* embedder_web_contents =
1545 GetFirstShellWindowWebContents(); 1414 GetFirstShellWindowWebContents();
1546 ASSERT_TRUE(embedder_web_contents); 1415 ASSERT_TRUE(embedder_web_contents);
1547 MockWebContentsDelegate* mock = new MockWebContentsDelegate; 1416 MockWebContentsDelegate* mock = new MockWebContentsDelegate;
1548 embedder_web_contents->SetDelegate(mock); 1417 embedder_web_contents->SetDelegate(mock);
1549 1418
1550 ExtensionTestMessageListener done_listener("DoneMediaTest.PASSED", false); 1419 ExtensionTestMessageListener done_listener("TEST_PASSED", false);
1551 done_listener.AlsoListenForFailureMessage("DoneMediaTest.FAILED"); 1420 done_listener.AlsoListenForFailureMessage("TEST_FAILED");
1552 EXPECT_TRUE( 1421 EXPECT_TRUE(
1553 content::ExecuteScript( 1422 content::ExecuteScript(
1554 embedder_web_contents, 1423 embedder_web_contents,
1555 base::StringPrintf("startAllowTest('%s')", 1424 base::StringPrintf("startAllowTest('%s')",
1556 test_name.c_str()))); 1425 test_name.c_str())));
1557 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); 1426 ASSERT_TRUE(done_listener.WaitUntilSatisfied());
1558 1427
1559 mock->WaitForSetMediaPermission(); 1428 mock->WaitForSetMediaPermission();
1560 } 1429 }
1561 1430
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 LoadAndLaunchPlatformApp("web_view/teardown"); 1493 LoadAndLaunchPlatformApp("web_view/teardown");
1625 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied()); 1494 ASSERT_TRUE(second_loaded_listener.WaitUntilSatisfied());
1626 } 1495 }
1627 1496
1628 // In following GeolocationAPIEmbedderHasNoAccess* tests, embedder (i.e. the 1497 // In following GeolocationAPIEmbedderHasNoAccess* tests, embedder (i.e. the
1629 // platform app) does not have geolocation permission for this test. 1498 // platform app) does not have geolocation permission for this test.
1630 // No matter what the API does, geolocation permission would be denied. 1499 // No matter what the API does, geolocation permission would be denied.
1631 // Note that the test name prefix must be "GeolocationAPI". 1500 // Note that the test name prefix must be "GeolocationAPI".
1632 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasNoAccessAllow) { 1501 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasNoAccessAllow) {
1633 TestHelper("testDenyDenies", 1502 TestHelper("testDenyDenies",
1634 "DoneGeolocationTest.PASSED",
1635 "DoneGeolocationTest.FAILED",
1636 "web_view/geolocation/embedder_has_no_permission"); 1503 "web_view/geolocation/embedder_has_no_permission");
1637 } 1504 }
1638 1505
1639 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasNoAccessDeny) { 1506 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasNoAccessDeny) {
1640 TestHelper("testDenyDenies", 1507 TestHelper("testDenyDenies",
1641 "DoneGeolocationTest.PASSED",
1642 "DoneGeolocationTest.FAILED",
1643 "web_view/geolocation/embedder_has_no_permission"); 1508 "web_view/geolocation/embedder_has_no_permission");
1644 } 1509 }
1645 1510
1646 // In following GeolocationAPIEmbedderHasAccess* tests, embedder (i.e. the 1511 // In following GeolocationAPIEmbedderHasAccess* tests, embedder (i.e. the
1647 // platform app) has geolocation permission 1512 // platform app) has geolocation permission
1648 // 1513 //
1649 // Note that these test names must be "GeolocationAPI" prefixed (b/c we mock out 1514 // Note that these test names must be "GeolocationAPI" prefixed (b/c we mock out
1650 // geolocation in this case). 1515 // geolocation in this case).
1651 // 1516 //
1652 // Also note that these are run separately because OverrideGeolocation() doesn't 1517 // Also note that these are run separately because OverrideGeolocation() doesn't
1653 // mock out geolocation for multiple navigator.geolocation calls properly and 1518 // mock out geolocation for multiple navigator.geolocation calls properly and
1654 // the tests become flaky. 1519 // the tests become flaky.
1655 // GeolocationAPI* test 1 of 3. 1520 // GeolocationAPI* test 1 of 3.
1656 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasAccessAllow) { 1521 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasAccessAllow) {
1657 TestHelper("testAllow", 1522 TestHelper("testAllow",
1658 "DoneGeolocationTest.PASSED",
1659 "DoneGeolocationTest.FAILED",
1660 "web_view/geolocation/embedder_has_permission"); 1523 "web_view/geolocation/embedder_has_permission");
1661 } 1524 }
1662 1525
1663 // GeolocationAPI* test 2 of 3. 1526 // GeolocationAPI* test 2 of 3.
1664 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasAccessDeny) { 1527 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPIEmbedderHasAccessDeny) {
1665 TestHelper("testDeny", 1528 TestHelper("testDeny",
1666 "DoneGeolocationTest.PASSED",
1667 "DoneGeolocationTest.FAILED",
1668 "web_view/geolocation/embedder_has_permission"); 1529 "web_view/geolocation/embedder_has_permission");
1669 } 1530 }
1670 1531
1671 // GeolocationAPI* test 3 of 3. 1532 // GeolocationAPI* test 3 of 3.
1672 IN_PROC_BROWSER_TEST_F(WebViewTest, 1533 IN_PROC_BROWSER_TEST_F(WebViewTest,
1673 GeolocationAPIEmbedderHasAccessMultipleBridgeIdAllow) { 1534 GeolocationAPIEmbedderHasAccessMultipleBridgeIdAllow) {
1674 TestHelper("testMultipleBridgeIdAllow", 1535 TestHelper("testMultipleBridgeIdAllow",
1675 "DoneGeolocationTest.PASSED",
1676 "DoneGeolocationTest.FAILED",
1677 "web_view/geolocation/embedder_has_permission"); 1536 "web_view/geolocation/embedder_has_permission");
1678 } 1537 }
1679 1538
1680 // Tests that 1539 // Tests that
1681 // BrowserPluginGeolocationPermissionContext::CancelGeolocationPermissionRequest 1540 // BrowserPluginGeolocationPermissionContext::CancelGeolocationPermissionRequest
1682 // is handled correctly (and does not crash). 1541 // is handled correctly (and does not crash).
1683 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPICancelGeolocation) { 1542 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPICancelGeolocation) {
1684 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages. 1543 ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages.
1685 ASSERT_TRUE(RunPlatformAppTest( 1544 ASSERT_TRUE(RunPlatformAppTest(
1686 "platform_apps/web_view/geolocation/cancel_request")) << message_; 1545 "platform_apps/web_view/geolocation/cancel_request")) << message_;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 extensions::ExtensionsClient::Get()->SetScriptingWhitelist(whitelist); 1620 extensions::ExtensionsClient::Get()->SetScriptingWhitelist(whitelist);
1762 1621
1763 // Load the extension. 1622 // Load the extension.
1764 const extensions::Extension* content_script_whitelisted_extension = 1623 const extensions::Extension* content_script_whitelisted_extension =
1765 LoadExtension(test_data_dir_.AppendASCII( 1624 LoadExtension(test_data_dir_.AppendASCII(
1766 "platform_apps/web_view/legacy/content_script")); 1625 "platform_apps/web_view/legacy/content_script"));
1767 ASSERT_TRUE(content_script_whitelisted_extension); 1626 ASSERT_TRUE(content_script_whitelisted_extension);
1768 ASSERT_EQ(extension_id, content_script_whitelisted_extension->id()); 1627 ASSERT_EQ(extension_id, content_script_whitelisted_extension->id());
1769 1628
1770 // Now load an app with <webview>. 1629 // Now load an app with <webview>.
1771 ExtensionTestMessageListener done_listener("DoneTest", false); 1630 ExtensionTestMessageListener done_listener("TEST_PASSED", false);
1772 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted"); 1631 LoadAndLaunchPlatformApp("web_view/content_script_whitelisted");
1773 ASSERT_TRUE(done_listener.WaitUntilSatisfied()); 1632 ASSERT_TRUE(done_listener.WaitUntilSatisfied());
1774 } 1633 }
1775 1634
1776 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) { 1635 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentReady) {
1777 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/document_ready")) 1636 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/document_ready"))
1778 << message_; 1637 << message_;
1779 } 1638 }
1780 1639
1781 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentInteractive) { 1640 IN_PROC_BROWSER_TEST_F(WebViewTest, SetPropertyOnDocumentInteractive) {
(...skipping 28 matching lines...) Expand all
1810 ASSERT_TRUE(RunPlatformAppTestWithArg( 1669 ASSERT_TRUE(RunPlatformAppTestWithArg(
1811 "platform_apps/web_view/common", "useragent")) << message_; 1670 "platform_apps/web_view/common", "useragent")) << message_;
1812 } 1671 }
1813 1672
1814 IN_PROC_BROWSER_TEST_F(WebViewTest, NoPermission) { 1673 IN_PROC_BROWSER_TEST_F(WebViewTest, NoPermission) {
1815 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/nopermission")) 1674 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/nopermission"))
1816 << message_; 1675 << message_;
1817 } 1676 }
1818 1677
1819 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestAlertDialog) { 1678 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestAlertDialog) {
1820 TestHelper("testAlertDialog", 1679 TestHelper("testAlertDialog", "web_view/dialog");
1821 "DoneDialogTest.PASSED",
1822 "DoneDialogTest.FAILED",
1823 "web_view/dialog");
1824 } 1680 }
1825 1681
1826 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialog) { 1682 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialog) {
1827 TestHelper("testConfirmDialog", 1683 TestHelper("testConfirmDialog", "web_view/dialog");
1828 "DoneDialogTest.PASSED",
1829 "DoneDialogTest.FAILED",
1830 "web_view/dialog");
1831 } 1684 }
1832 1685
1833 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogCancel) { 1686 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogCancel) {
1834 TestHelper("testConfirmDialogCancel", 1687 TestHelper("testConfirmDialogCancel", "web_view/dialog");
1835 "DoneDialogTest.PASSED",
1836 "DoneDialogTest.FAILED",
1837 "web_view/dialog");
1838 } 1688 }
1839 1689
1840 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogDefaultCancel) { 1690 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestConfirmDialogDefaultCancel) {
1841 TestHelper("testConfirmDialogDefaultCancel", 1691 TestHelper("testConfirmDialogDefaultCancel", "web_view/dialog");
1842 "DoneDialogTest.PASSED",
1843 "DoneDialogTest.FAILED",
1844 "web_view/dialog");
1845 } 1692 }
1846 1693
1847 // TODO(fsamuel): This test consistently times out when run in parallel with 1694 // TODO(fsamuel): This test consistently times out when run in parallel with
1848 // other tests, but consistently passes when retried. Disable for now. 1695 // other tests, but consistently passes when retried. Disable for now.
1849 // See http://crbug.com/314809 1696 // See http://crbug.com/314809
1850 IN_PROC_BROWSER_TEST_F(WebViewTest, 1697 IN_PROC_BROWSER_TEST_F(WebViewTest,
1851 DISABLED_Dialog_TestConfirmDialogDefaultGCCancel) { 1698 DISABLED_Dialog_TestConfirmDialogDefaultGCCancel) {
1852 TestHelper("testConfirmDialogDefaultGCCancel", 1699 TestHelper("testConfirmDialogDefaultGCCancel", "web_view/dialog");
1853 "DoneDialogTest.PASSED",
1854 "DoneDialogTest.FAILED",
1855 "web_view/dialog");
1856 } 1700 }
1857 1701
1858 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestPromptDialog) { 1702 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestPromptDialog) {
1859 TestHelper("testPromptDialog", 1703 TestHelper("testPromptDialog", "web_view/dialog");
1860 "DoneDialogTest.PASSED",
1861 "DoneDialogTest.FAILED",
1862 "web_view/dialog");
1863 } 1704 }
1864 1705
1865 #if defined(ENABLE_PLUGINS) 1706 #if defined(ENABLE_PLUGINS)
1866 class WebViewPluginTest : public WebViewTest { 1707 class WebViewPluginTest : public WebViewTest {
1867 protected: 1708 protected:
1868 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 1709 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
1869 WebViewTest::SetUpCommandLine(command_line); 1710 WebViewTest::SetUpCommandLine(command_line);
1870 1711
1871 // Append the switch to register the pepper plugin. 1712 // Append the switch to register the pepper plugin.
1872 // library name = <out dir>/<test_name>.<library_extension> 1713 // library name = <out dir>/<test_name>.<library_extension>
1873 // MIME type = application/x-ppapi-<test_name> 1714 // MIME type = application/x-ppapi-<test_name>
1874 base::FilePath plugin_dir; 1715 base::FilePath plugin_dir;
1875 EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir)); 1716 EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir));
1876 1717
1877 base::FilePath plugin_lib = plugin_dir.Append(library_name); 1718 base::FilePath plugin_lib = plugin_dir.Append(library_name);
1878 EXPECT_TRUE(base::PathExists(plugin_lib)); 1719 EXPECT_TRUE(base::PathExists(plugin_lib));
1879 base::FilePath::StringType pepper_plugin = plugin_lib.value(); 1720 base::FilePath::StringType pepper_plugin = plugin_lib.value();
1880 pepper_plugin.append(FILE_PATH_LITERAL(";application/x-ppapi-tests")); 1721 pepper_plugin.append(FILE_PATH_LITERAL(";application/x-ppapi-tests"));
1881 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, 1722 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins,
1882 pepper_plugin); 1723 pepper_plugin);
1883 } 1724 }
1884 }; 1725 };
1885 1726
1886 IN_PROC_BROWSER_TEST_F(WebViewPluginTest, TestLoadPluginEvent) { 1727 IN_PROC_BROWSER_TEST_F(WebViewPluginTest, TestLoadPluginEvent) {
1887 TestHelper("testPluginLoadPermission", 1728 TestHelper("testPluginLoadPermission", "web_view/shim");
1888 "DoneShimTest.PASSED",
1889 "DoneShimTest.FAILED",
1890 "web_view/shim");
1891 } 1729 }
1892 #endif // defined(ENABLE_PLUGINS) 1730 #endif // defined(ENABLE_PLUGINS)
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/web_view/content_script_whitelisted/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698