| 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 /** | 5 /** |
| 6 * @fileoverview Test suite for the Material Design history page. | 6 * @fileoverview Test suite for the Material Design history page. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 var ROOT_PATH = '../../../../../'; | 9 var ROOT_PATH = '../../../../../'; |
| 10 | 10 |
| 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 GEN('#include "base/command_line.h"'); |
| 14 GEN('#include "chrome/test/data/webui/history_ui_browsertest.h"'); |
| 13 | 15 |
| 14 function MaterialHistoryBrowserTest() {} | 16 function MaterialHistoryBrowserTest() {} |
| 15 | 17 |
| 16 MaterialHistoryBrowserTest.prototype = { | 18 MaterialHistoryBrowserTest.prototype = { |
| 17 __proto__: PolymerTest.prototype, | 19 __proto__: PolymerTest.prototype, |
| 18 | 20 |
| 19 browsePreload: 'chrome://history', | 21 browsePreload: 'chrome://history', |
| 20 | 22 |
| 21 commandLineSwitches: [{switchName: 'enable-md-history'}], | 23 commandLineSwitches: [{switchName: 'enable-md-history'}], |
| 22 | 24 |
| 23 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 25 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 24 'test_util.js', | 26 'test_util.js', |
| 25 'history_card_manager_test.js', | 27 'history_card_manager_test.js', |
| 26 'history_card_test.js', | 28 'history_card_test.js', |
| 27 'history_overflow_menu_test.js', | 29 'history_overflow_menu_test.js', |
| 30 'history_supervised_user_test.js', |
| 28 'history_toolbar_test.js' | 31 'history_toolbar_test.js' |
| 29 ]) | 32 ]) |
| 30 }; | 33 }; |
| 31 | 34 |
| 32 TEST_F('MaterialHistoryBrowserTest', 'HistoryCardTest', function() { | 35 TEST_F('MaterialHistoryBrowserTest', 'HistoryCardTest', function() { |
| 33 md_history.history_card_test.registerTests(); | 36 md_history.history_card_test.registerTests(); |
| 34 mocha.run(); | 37 mocha.run(); |
| 35 }); | 38 }); |
| 36 | 39 |
| 37 TEST_F('MaterialHistoryBrowserTest', 'HistoryCardManagerTest', function() { | 40 TEST_F('MaterialHistoryBrowserTest', 'HistoryCardManagerTest', function() { |
| 38 md_history.history_card_manager_test.registerTests(); | 41 md_history.history_card_manager_test.registerTests(); |
| 39 mocha.run(); | 42 mocha.run(); |
| 40 }); | 43 }); |
| 41 | 44 |
| 42 TEST_F('MaterialHistoryBrowserTest', 'HistoryToolbarTest', function() { | 45 TEST_F('MaterialHistoryBrowserTest', 'HistoryToolbarTest', function() { |
| 43 md_history.history_toolbar_test.registerTests(); | 46 md_history.history_toolbar_test.registerTests(); |
| 44 mocha.run(); | 47 mocha.run(); |
| 45 }); | 48 }); |
| 46 | 49 |
| 47 TEST_F('MaterialHistoryBrowserTest', 'HistoryOverflowMenuTest', function() { | 50 TEST_F('MaterialHistoryBrowserTest', 'HistoryOverflowMenuTest', function() { |
| 48 md_history.history_overflow_menu_test.registerTests(); | 51 md_history.history_overflow_menu_test.registerTests(); |
| 49 mocha.run(); | 52 mocha.run(); |
| 50 }); | 53 }); |
| 54 |
| 55 function MaterialHistoryDeletionDisabledTest() {} |
| 56 |
| 57 MaterialHistoryDeletionDisabledTest.prototype = { |
| 58 __proto__: MaterialHistoryBrowserTest.prototype, |
| 59 |
| 60 typedefCppFixture: 'HistoryUIBrowserTest', |
| 61 |
| 62 testGenPreamble: function() { |
| 63 GEN(' SetDeleteAllowed(false);'); |
| 64 } |
| 65 }; |
| 66 |
| 67 TEST_F('MaterialHistoryDeletionDisabledTest', 'HistorySupervisedUserTest', |
| 68 function() { |
| 69 md_history.history_supervised_user_test.registerTests(); |
| 70 mocha.run(); |
| 71 }); |
| OLD | NEW |