| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 bookmarks page. | 6 * @fileoverview Test suite for the Material Design bookmarks page. |
| 7 */ | 7 */ |
| 8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
| 9 | 9 |
| 10 GEN_INCLUDE( | 10 GEN_INCLUDE( |
| 11 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); | 11 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); |
| 12 GEN('#include "base/command_line.h"'); | 12 GEN('#include "base/command_line.h"'); |
| 13 | 13 |
| 14 function MaterialBookmarksBrowserTest() {} | 14 function MaterialBookmarksBrowserTest() {} |
| 15 | 15 |
| 16 MaterialBookmarksBrowserTest.prototype = { | 16 MaterialBookmarksBrowserTest.prototype = { |
| 17 __proto__: PolymerTest.prototype, | 17 __proto__: PolymerTest.prototype, |
| 18 | 18 |
| 19 browsePreload: 'chrome://bookmarks', | 19 browsePreload: 'chrome://bookmarks', |
| 20 | 20 |
| 21 commandLineSwitches: [{switchName: 'enable-features', | 21 commandLineSwitches: [{switchName: 'enable-features', |
| 22 switchValue: 'MaterialDesignBookmarks'}], | 22 switchValue: 'MaterialDesignBookmarks'}], |
| 23 | 23 |
| 24 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 24 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 25 'test_store.js', | 25 'test_store.js', |
| 26 'test_util.js', | 26 'test_util.js', |
| 27 ]), | 27 ]), |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 function MaterialBookmarksStoreTest() {} | |
| 31 | |
| 32 MaterialBookmarksStoreTest.prototype = { | |
| 33 __proto__: MaterialBookmarksBrowserTest.prototype, | |
| 34 | |
| 35 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | |
| 36 'store_test.js', | |
| 37 ]), | |
| 38 }; | |
| 39 | |
| 40 TEST_F('MaterialBookmarksStoreTest', 'All', function() { | |
| 41 mocha.run(); | |
| 42 }); | |
| 43 | |
| 44 function MaterialBookmarksSidebarTest() {} | |
| 45 | |
| 46 MaterialBookmarksSidebarTest.prototype = { | |
| 47 __proto__: MaterialBookmarksBrowserTest.prototype, | |
| 48 | |
| 49 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | |
| 50 'sidebar_test.js', | |
| 51 ]), | |
| 52 }; | |
| 53 | |
| 54 TEST_F('MaterialBookmarksSidebarTest', 'All', function() { | |
| 55 mocha.run(); | |
| 56 }); | |
| 57 | |
| 58 function MaterialBookmarksEditDialogTest() {} | 30 function MaterialBookmarksEditDialogTest() {} |
| 59 | 31 |
| 60 MaterialBookmarksEditDialogTest.prototype = { | 32 MaterialBookmarksEditDialogTest.prototype = { |
| 61 __proto__: MaterialBookmarksBrowserTest.prototype, | 33 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 62 | 34 |
| 63 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | 35 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 64 'edit_dialog_test.js', | 36 'edit_dialog_test.js', |
| 65 ]), | 37 ]), |
| 66 }; | 38 }; |
| 67 | 39 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 chrome.bookmarks.search = function(query) { | 108 chrome.bookmarks.search = function(query) { |
| 137 window.searchedQuery = query; | 109 window.searchedQuery = query; |
| 138 }; | 110 }; |
| 139 }, | 111 }, |
| 140 }; | 112 }; |
| 141 | 113 |
| 142 TEST_F('MaterialBookmarksRouterOnLoadTest', 'All', function() { | 114 TEST_F('MaterialBookmarksRouterOnLoadTest', 'All', function() { |
| 143 mocha.grep('URL preload').run(); | 115 mocha.grep('URL preload').run(); |
| 144 }); | 116 }); |
| 145 | 117 |
| 118 function MaterialBookmarksSidebarTest() {} |
| 119 |
| 120 MaterialBookmarksSidebarTest.prototype = { |
| 121 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 122 |
| 123 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 124 'sidebar_test.js', |
| 125 ]), |
| 126 }; |
| 127 |
| 128 TEST_F('MaterialBookmarksSidebarTest', 'All', function() { |
| 129 mocha.run(); |
| 130 }); |
| 131 |
| 146 function MaterialBookmarksStoreClientTest() {} | 132 function MaterialBookmarksStoreClientTest() {} |
| 147 | 133 |
| 148 MaterialBookmarksStoreClientTest.prototype = { | 134 MaterialBookmarksStoreClientTest.prototype = { |
| 149 __proto__: MaterialBookmarksBrowserTest.prototype, | 135 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 150 | 136 |
| 151 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | 137 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 152 'store_client_test.js', | 138 'store_client_test.js', |
| 153 ]), | 139 ]), |
| 154 }; | 140 }; |
| 155 | 141 |
| 156 TEST_F('MaterialBookmarksStoreClientTest', 'All', function() { | 142 TEST_F('MaterialBookmarksStoreClientTest', 'All', function() { |
| 157 mocha.run(); | 143 mocha.run(); |
| 158 }); | 144 }); |
| OLD | NEW |