| 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 // Include test fixture. | 5 // Include test fixture. |
| 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); | 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Test fixture for ISearch. | 9 * Test fixture for ISearch. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 this.expect_.push(this.test.newCallback(function(node, isBound) { | 57 this.expect_.push(this.test.newCallback(function(node, isBound) { |
| 58 var actual = node.name || node.role; | 58 var actual = node.name || node.role; |
| 59 if (isBound) | 59 if (isBound) |
| 60 actual = 'boundary=' + actual; | 60 actual = 'boundary=' + actual; |
| 61 assertEquals(str, actual); | 61 assertEquals(str, actual); |
| 62 opt_callback && opt_callback(); | 62 opt_callback && opt_callback(); |
| 63 })); | 63 })); |
| 64 } | 64 } |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 TEST_F('ISearchTest', 'Simple', function() { | 67 TEST_F('ISearchTest', 'DISABLED_Simple', function() { |
| 68 this.runWithLoadedTree(this.linksAndHeadingsDoc, function(rootNode) { | 68 this.runWithLoadedTree(this.linksAndHeadingsDoc, function(rootNode) { |
| 69 var handler = new FakeISearchHandler(this); | 69 var handler = new FakeISearchHandler(this); |
| 70 var search = new ISearch(rootNode); | 70 var search = new ISearch(rootNode); |
| 71 search.handler = handler; | 71 search.handler = handler; |
| 72 | 72 |
| 73 // Simple forward search. | 73 // Simple forward search. |
| 74 search.search('US', 'forward'); | 74 search.search('US', 'forward'); |
| 75 handler.expect('About US', | 75 handler.expect('About US', |
| 76 search.search.bind(search, 'start', 'backward')); | 76 search.search.bind(search, 'start', 'backward')); |
| 77 | 77 |
| 78 handler.expect('start', | 78 handler.expect('start', |
| 79 // Boundary (beginning). | 79 // Boundary (beginning). |
| 80 search.search.bind(search, 'foo', 'backward')); | 80 search.search.bind(search, 'foo', 'backward')); |
| 81 | 81 |
| 82 handler.expect('boundary=start', | 82 handler.expect('boundary=start', |
| 83 // Boundary (end). | 83 // Boundary (end). |
| 84 search.search.bind(search, 'foo', 'forward')); | 84 search.search.bind(search, 'foo', 'forward')); |
| 85 | 85 |
| 86 // Search "focus" doesn't move. | 86 // Search "focus" doesn't move. |
| 87 handler.expect('boundary=start', | 87 handler.expect('boundary=start', |
| 88 // Mixed case substring. | 88 // Mixed case substring. |
| 89 search.search.bind(search, 'bReak', 'forward')); | 89 search.search.bind(search, 'bReak', 'forward')); |
| 90 | 90 |
| 91 handler.expect('Latest Breaking News', | 91 handler.expect('Latest Breaking News', |
| 92 search.search.bind(search, 'bReak', 'forward')); | 92 search.search.bind(search, 'bReak', 'forward')); |
| 93 | 93 |
| 94 handler.expect('boundary=Latest Breaking News'); | 94 handler.expect('boundary=Latest Breaking News'); |
| 95 }); | 95 }); |
| 96 }); | 96 }); |
| OLD | NEW |