OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @fileoverview Runs the Polymer Settings tests. */ | 5 /** @fileoverview Runs the Polymer Settings tests. */ |
6 | 6 |
7 /** @const {string} Path to source root. */ | 7 /** @const {string} Path to source root. */ |
8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
9 | 9 |
10 // Polymer BrowserTest fixture. | 10 // Polymer BrowserTest fixture. |
11 GEN_INCLUDE( | 11 GEN_INCLUDE( |
12 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); | 12 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); |
13 | 13 |
14 /** | 14 /** |
15 * Test fixture for Polymer Settings elements. | 15 * Test fixture for Polymer Settings elements. |
16 * @constructor | 16 * @constructor |
17 * @extends {PolymerTest} | 17 * @extends {PolymerTest} |
18 */ | 18 */ |
19 function CrSettingsBrowserTest() {} | 19 function CrSettingsBrowserTest() {} |
20 | 20 |
21 CrSettingsBrowserTest.prototype = { | 21 CrSettingsBrowserTest.prototype = { |
22 __proto__: PolymerTest.prototype, | 22 __proto__: PolymerTest.prototype, |
23 | 23 |
24 /** @override */ | 24 /** @override */ |
25 get browsePreload() { | 25 get browsePreload() { |
26 throw 'this is abstract and should be overriden by subclasses'; | 26 throw 'this is abstract and should be overridden by subclasses'; |
27 }, | 27 }, |
28 | 28 |
29 /** @override */ | 29 /** @override */ |
30 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 30 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
31 'ensure_lazy_loaded.js', | 31 'ensure_lazy_loaded.js', |
32 ]), | 32 ]), |
33 | 33 |
34 /** @override */ | 34 /** @override */ |
35 setUp: function() { | 35 setUp: function() { |
36 PolymerTest.prototype.setUp.call(this); | 36 PolymerTest.prototype.setUp.call(this); |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
770 'privacy_page_test.js', | 770 'privacy_page_test.js', |
771 ]), | 771 ]), |
772 }; | 772 }; |
773 | 773 |
774 TEST_F('CrSettingsPrivacyPageTest', 'PrivacyPage', function() { | 774 TEST_F('CrSettingsPrivacyPageTest', 'PrivacyPage', function() { |
775 settings_privacy_page.registerTests(); | 775 settings_privacy_page.registerTests(); |
776 mocha.run(); | 776 mocha.run(); |
777 }); | 777 }); |
778 | 778 |
779 /** | 779 /** |
780 * Test fixture for chrome/browser/resources/settings/site_settings/. | |
781 * @constructor | 780 * @constructor |
782 * @extends {CrSettingsBrowserTest} | 781 * @extends {CrSettingsBrowserTest} |
783 */ | 782 */ |
784 function CrSettingsSiteSettingsTest() {} | 783 function CrSettingsSiteDataDetailsTest() {} |
785 | 784 |
786 CrSettingsSiteSettingsTest.prototype = { | 785 CrSettingsSiteDataDetailsTest.prototype = { |
787 __proto__: CrSettingsBrowserTest.prototype, | 786 __proto__: CrSettingsBrowserTest.prototype, |
788 | 787 |
789 /** @override */ | 788 /** @override */ |
790 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | 789 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', |
791 | 790 |
792 /** @override */ | 791 /** @override */ |
793 commandLineSwitches: [{ | 792 commandLineSwitches: [{ |
794 switchName: 'enable-site-settings', | 793 switchName: 'enable-site-settings', |
795 }], | 794 }], |
796 | 795 |
797 /** @override */ | 796 /** @override */ |
798 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | 797 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ |
799 // TODO(dbeam): split these up. | |
800 'category_default_setting_tests.js', | |
801 'category_setting_exceptions_tests.js', | |
802 'site_details_tests.js', | |
803 'site_details_permission_tests.js', | |
804 'site_list_tests.js', | |
805 'test_browser_proxy.js', | 798 'test_browser_proxy.js', |
806 'test_site_settings_prefs_browser_proxy.js', | 799 'test_site_settings_prefs_browser_proxy.js', |
807 'zoom_levels_tests.js', | |
808 'usb_devices_tests.js', | |
809 'site_data_details_subpage_tests.js', | 800 'site_data_details_subpage_tests.js', |
810 ]), | 801 ]), |
811 }; | 802 }; |
812 | 803 |
813 TEST_F('CrSettingsSiteSettingsTest', 'SiteSettings', function() { | 804 TEST_F('CrSettingsSiteDataDetailsTest', 'SiteSettings', function() { |
814 category_default_setting.registerTests(); | |
815 category_setting_exceptions.registerTests(); | |
816 site_details.registerTests(); | |
817 site_details_permission.registerTests(); | |
818 site_list.registerTests(); | |
819 zoom_levels.registerTests(); | |
820 usb_devices.registerTests(); | |
821 | |
822 mocha.run(); | 805 mocha.run(); |
823 }); | 806 }); |
824 | 807 |
808 /** | |
809 * @constructor | |
810 * @extends {CrSettingsBrowserTest} | |
811 */ | |
812 function CrSettingsCategoryDefaultSettingTest() {} | |
813 | |
814 CrSettingsCategoryDefaultSettingTest.prototype = { | |
815 __proto__: CrSettingsBrowserTest.prototype, | |
816 | |
817 /** @override */ | |
818 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
819 | |
820 /** @override */ | |
821 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
822 'test_browser_proxy.js', | |
823 'test_site_settings_prefs_browser_proxy.js', | |
824 'category_default_setting_tests.js', | |
825 ]), | |
826 }; | |
827 | |
828 TEST_F( | |
829 'CrSettingsCategoryDefaultSettingTest', 'CategoryDefaultSetting', | |
Dan Beam
2017/05/04 22:57:42
what's the point of the second name here? it just
dschuyler
2017/05/04 23:45:41
Moved to https://codereview.chromium.org/286202300
| |
830 function() { | |
831 mocha.run(); | |
832 }); | |
833 | |
834 /** | |
835 * @constructor | |
836 * @extends {CrSettingsBrowserTest} | |
837 */ | |
838 function CrSettingsCategorySettingExceptionsTest() {} | |
839 | |
840 CrSettingsCategorySettingExceptionsTest.prototype = { | |
841 __proto__: CrSettingsBrowserTest.prototype, | |
842 | |
843 /** @override */ | |
844 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
845 | |
846 /** @override */ | |
847 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
848 'test_browser_proxy.js', | |
849 'test_site_settings_prefs_browser_proxy.js', | |
850 'category_setting_exceptions_tests.js', | |
851 ]), | |
852 }; | |
853 | |
854 TEST_F( | |
855 'CrSettingsCategorySettingExceptionsTest', 'CategorySettingExceptions', | |
Dan Beam
2017/05/04 22:57:42
same
dschuyler
2017/05/04 23:45:41
Acknowledged.
| |
856 function() { | |
857 mocha.run(); | |
858 }); | |
859 | |
860 /** | |
861 * @constructor | |
862 * @extends {CrSettingsBrowserTest} | |
863 */ | |
864 function CrSettingsSiteDetailsTest() {} | |
865 | |
866 CrSettingsSiteDetailsTest.prototype = { | |
867 __proto__: CrSettingsBrowserTest.prototype, | |
868 | |
869 /** @override */ | |
870 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
871 | |
872 /** @override */ | |
873 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
874 'test_browser_proxy.js', | |
875 'test_site_settings_prefs_browser_proxy.js', | |
876 'site_details_tests.js', | |
877 ]), | |
878 }; | |
879 | |
880 TEST_F('CrSettingsSiteDetailsTest', 'SiteDetails', function() { | |
881 mocha.run(); | |
882 }); | |
883 | |
884 /** | |
885 * @constructor | |
886 * @extends {CrSettingsBrowserTest} | |
887 */ | |
888 function CrSettingsSiteDetailsPermissionTest() {} | |
889 | |
890 CrSettingsSiteDetailsPermissionTest.prototype = { | |
891 __proto__: CrSettingsBrowserTest.prototype, | |
892 | |
893 /** @override */ | |
894 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
895 | |
896 /** @override */ | |
897 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
898 'test_browser_proxy.js', | |
899 'test_site_settings_prefs_browser_proxy.js', | |
900 'site_details_permission_tests.js', | |
901 ]), | |
902 }; | |
903 | |
904 TEST_F( | |
905 'CrSettingsSiteDetailsPermissionTest', 'SiteDetailsPermission', function() { | |
906 mocha.run(); | |
907 }); | |
908 | |
909 /** | |
910 * @constructor | |
911 * @extends {CrSettingsBrowserTest} | |
912 */ | |
913 function CrSettingsSiteListTest() {} | |
914 | |
915 CrSettingsSiteListTest.prototype = { | |
916 __proto__: CrSettingsBrowserTest.prototype, | |
917 | |
918 /** @override */ | |
919 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
920 | |
921 /** @override */ | |
922 commandLineSwitches: [{ | |
923 switchName: 'enable-site-settings', | |
924 }], | |
925 | |
926 /** @override */ | |
927 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
928 'test_browser_proxy.js', | |
929 'test_site_settings_prefs_browser_proxy.js', | |
930 'site_list_tests.js', | |
931 ]), | |
932 }; | |
933 | |
934 TEST_F('CrSettingsSiteListTest', 'SiteList', function() { | |
935 mocha.grep('SiteList').run(); | |
936 }); | |
937 | |
938 TEST_F('CrSettingsSiteListTest', 'EditExceptionDialog', function() { | |
939 mocha.grep('EditExceptionDialog').run(); | |
940 }); | |
941 | |
942 TEST_F('CrSettingsSiteListTest', 'AddExceptionDialog', function() { | |
943 mocha.grep('AddExceptionDialog').run(); | |
Dan Beam
2017/05/04 22:57:42
sweet
dschuyler
2017/05/04 23:45:41
Acknowledged.
| |
944 }); | |
945 | |
946 /** | |
947 * @constructor | |
948 * @extends {CrSettingsBrowserTest} | |
949 */ | |
950 function CrSettingsZoomLevelsTest() {} | |
951 | |
952 CrSettingsZoomLevelsTest.prototype = { | |
953 __proto__: CrSettingsBrowserTest.prototype, | |
954 | |
955 /** @override */ | |
956 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
957 | |
958 /** @override */ | |
959 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
960 'test_browser_proxy.js', | |
961 'test_site_settings_prefs_browser_proxy.js', | |
962 'zoom_levels_tests.js', | |
963 ]), | |
964 }; | |
965 | |
966 TEST_F('CrSettingsZoomLevelsTest', 'ZoomLevels', function() { | |
967 mocha.run(); | |
968 }); | |
969 | |
970 /** | |
971 * @constructor | |
972 * @extends {CrSettingsBrowserTest} | |
973 */ | |
974 function CrSettingsUsbDevicesTest() {} | |
975 | |
976 CrSettingsUsbDevicesTest.prototype = { | |
977 __proto__: CrSettingsBrowserTest.prototype, | |
978 | |
979 /** @override */ | |
980 browsePreload: 'chrome://md-settings/privacy_page/privacy_page.html', | |
981 | |
982 /** @override */ | |
983 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | |
984 'test_browser_proxy.js', | |
985 'test_site_settings_prefs_browser_proxy.js', | |
986 'usb_devices_tests.js', | |
987 ]), | |
988 }; | |
989 | |
990 TEST_F('CrSettingsUsbDevicesTest', 'UsbDevices', function() { | |
991 mocha.run(); | |
992 }); | |
993 | |
825 /** | 994 /** |
826 * @constructor | 995 * @constructor |
827 * @extends {CrSettingsBrowserTest} | 996 * @extends {CrSettingsBrowserTest} |
828 */ | 997 */ |
829 function CrSettingsProtocolHandlersTest() {} | 998 function CrSettingsProtocolHandlersTest() {} |
830 | 999 |
831 CrSettingsProtocolHandlersTest.prototype = { | 1000 CrSettingsProtocolHandlersTest.prototype = { |
832 __proto__: CrSettingsBrowserTest.prototype, | 1001 __proto__: CrSettingsBrowserTest.prototype, |
833 | 1002 |
834 /** @override */ | 1003 /** @override */ |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1445 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ | 1614 extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ |
1446 'test_browser_proxy.js', | 1615 'test_browser_proxy.js', |
1447 'test_extension_control_browser_proxy.js', | 1616 'test_extension_control_browser_proxy.js', |
1448 'extension_controlled_indicator_tests.js', | 1617 'extension_controlled_indicator_tests.js', |
1449 ]), | 1618 ]), |
1450 }; | 1619 }; |
1451 | 1620 |
1452 TEST_F('CrSettingsExtensionControlledIndicatorTest', 'All', function() { | 1621 TEST_F('CrSettingsExtensionControlledIndicatorTest', 'All', function() { |
1453 mocha.run(); | 1622 mocha.run(); |
1454 }); | 1623 }); |
OLD | NEW |