| 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 MaterialBookmarksActionsTest() {} |
| 31 |
| 32 MaterialBookmarksActionsTest.prototype = { |
| 33 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 34 |
| 35 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 36 'actions_test.js', |
| 37 ]), |
| 38 }; |
| 39 |
| 40 TEST_F('MaterialBookmarksActionsTest', 'All', function() { |
| 41 mocha.run(); |
| 42 }); |
| 43 |
| 30 function MaterialBookmarksAppTest() {} | 44 function MaterialBookmarksAppTest() {} |
| 31 | 45 |
| 32 MaterialBookmarksAppTest.prototype = { | 46 MaterialBookmarksAppTest.prototype = { |
| 33 __proto__: MaterialBookmarksBrowserTest.prototype, | 47 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 34 | 48 |
| 35 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | 49 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 36 'app_test.js', | 50 'app_test.js', |
| 37 ]), | 51 ]), |
| 38 }; | 52 }; |
| 39 | 53 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 129 |
| 116 MaterialBookmarksRouterTest.prototype = { | 130 MaterialBookmarksRouterTest.prototype = { |
| 117 __proto__: MaterialBookmarksBrowserTest.prototype, | 131 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 118 | 132 |
| 119 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | 133 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 120 'router_test.js', | 134 'router_test.js', |
| 121 ]), | 135 ]), |
| 122 }; | 136 }; |
| 123 | 137 |
| 124 TEST_F('MaterialBookmarksRouterTest', 'All', function() { | 138 TEST_F('MaterialBookmarksRouterTest', 'All', function() { |
| 125 mocha.grep('<bookmarks-router>').run(); | 139 mocha.run(); |
| 126 }); | |
| 127 | |
| 128 function MaterialBookmarksRouterOnLoadTest() {} | |
| 129 | |
| 130 MaterialBookmarksRouterOnLoadTest.prototype = { | |
| 131 __proto__: MaterialBookmarksRouterTest.prototype, | |
| 132 | |
| 133 browsePreload: 'chrome://bookmarks/?q=testQuery', | |
| 134 | |
| 135 setUp: function() { | |
| 136 chrome.bookmarks.search = function(query) { | |
| 137 window.searchedQuery = query; | |
| 138 }; | |
| 139 }, | |
| 140 }; | |
| 141 | |
| 142 TEST_F('MaterialBookmarksRouterOnLoadTest', 'All', function() { | |
| 143 mocha.grep('URL preload').run(); | |
| 144 }); | 140 }); |
| 145 | 141 |
| 146 function MaterialBookmarksSidebarTest() {} | 142 function MaterialBookmarksSidebarTest() {} |
| 147 | 143 |
| 148 MaterialBookmarksSidebarTest.prototype = { | 144 MaterialBookmarksSidebarTest.prototype = { |
| 149 __proto__: MaterialBookmarksBrowserTest.prototype, | 145 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 150 | 146 |
| 151 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | 147 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 152 'sidebar_test.js', | 148 'sidebar_test.js', |
| 153 ]), | 149 ]), |
| (...skipping 23 matching lines...) Expand all Loading... |
| 177 __proto__: MaterialBookmarksBrowserTest.prototype, | 173 __proto__: MaterialBookmarksBrowserTest.prototype, |
| 178 | 174 |
| 179 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ | 175 extraLibraries: MaterialBookmarksBrowserTest.prototype.extraLibraries.concat([ |
| 180 'util_test.js', | 176 'util_test.js', |
| 181 ]), | 177 ]), |
| 182 }; | 178 }; |
| 183 | 179 |
| 184 TEST_F('MaterialBookmarksUtilTest', 'All', function() { | 180 TEST_F('MaterialBookmarksUtilTest', 'All', function() { |
| 185 mocha.run(); | 181 mocha.run(); |
| 186 }); | 182 }); |
| OLD | NEW |