Chromium Code Reviews| 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 * @param {!Array<string>} list | 6 * @param {!Array<string>} list |
| 7 * @return {string} | 7 * @return {string} |
| 8 */ | 8 */ |
| 9 function str(list) { | 9 function str(list) { |
| 10 return JSON.stringify(list); | 10 return JSON.stringify(list); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 var ActionService = downloads.ActionService; | 30 var ActionService = downloads.ActionService; |
| 31 assertEquals(str([]), str(ActionService.splitTerms(''))); | 31 assertEquals(str([]), str(ActionService.splitTerms(''))); |
| 32 assertEquals(str([]), str(ActionService.splitTerms(' '))); | 32 assertEquals(str([]), str(ActionService.splitTerms(' '))); |
| 33 assertEquals(str(['a']), str(ActionService.splitTerms('a'))); | 33 assertEquals(str(['a']), str(ActionService.splitTerms('a'))); |
| 34 assertEquals(str(['a b']), str(ActionService.splitTerms('a b'))); | 34 assertEquals(str(['a b']), str(ActionService.splitTerms('a b'))); |
| 35 assertEquals(str(['a', 'b']), str(ActionService.splitTerms('a "b"'))); | 35 assertEquals(str(['a', 'b']), str(ActionService.splitTerms('a "b"'))); |
| 36 assertEquals(str(['a', 'b', 'c']), str(ActionService.splitTerms('a "b" c'))); | 36 assertEquals(str(['a', 'b', 'c']), str(ActionService.splitTerms('a "b" c'))); |
| 37 assertEquals(str(['a', 'b b', 'c']), | 37 assertEquals(str(['a', 'b b', 'c']), |
| 38 str(ActionService.splitTerms('a "b b" c'))); | 38 str(ActionService.splitTerms('a "b b" c'))); |
| 39 }); | 39 }); |
| 40 | |
| 41 TEST_F('ActionServiceUnitTest', 'searchWithSimilarTerms', function() { | |
|
tsergeant
2016/08/25 23:22:22
Looks like this test is calling chrome.send unexpe
Dan Beam
2016/08/25 23:49:06
Done.
| |
| 42 assertTrue(downloads.ActionService.getInstance().search('a')); | |
| 43 assertFalse(downloads.ActionService.getInstance().search('a ')); | |
| 44 }); | |
| OLD | NEW |