Chromium Code Reviews| 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 * Replace the current body of the test with a new element. | 6 * Replace the current body of the test with a new element. |
| 7 * @param {Element} element | 7 * @param {Element} element |
| 8 */ | 8 */ |
| 9 function replaceBody(element) { | 9 function replaceBody(element) { |
| 10 PolymerTest.clearBody(); | 10 PolymerTest.clearBody(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 id: id, | 62 id: id, |
| 63 title: '', | 63 title: '', |
| 64 url: 'http://www.google.com/', | 64 url: 'http://www.google.com/', |
| 65 }; | 65 }; |
| 66 if (config) { | 66 if (config) { |
| 67 for (var key in config) | 67 for (var key in config) |
| 68 newItem[key] = config[key]; | 68 newItem[key] = config[key]; |
| 69 } | 69 } |
| 70 return newItem; | 70 return newItem; |
| 71 } | 71 } |
| 72 | |
| 73 /** | |
| 74 * Overrides the chrome.bookmarks.search to pass searchResult into the callback. | |
| 75 * @param {Array} searchResult | |
|
calamity
2017/01/18 03:37:22
results
angelayang
2017/01/18 06:34:03
Done.
| |
| 76 */ | |
| 77 function replaceChromeSearch (searchResult) { | |
|
calamity
2017/01/18 03:37:22
overrideBookmarksSearch, perhaps?
angelayang
2017/01/18 06:34:03
Done.
| |
| 78 chrome.bookmarks.search = function(searchTerm, callback) { | |
| 79 callback(searchResult); | |
| 80 }; | |
| 81 } | |
|
calamity
2017/01/18 03:37:22
I like this, but maybe just put it in store_test.j
angelayang
2017/01/18 06:34:03
Done.
| |
| OLD | NEW |