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 cr.define('settings_search_engines_page', function() { | 5 cr.define('settings_search_engines_page', function() { |
6 /** | 6 /** |
7 * @param {boolean} canBeDefault | 7 * @param {boolean} canBeDefault |
8 * @param {boolean} canBeEdited | 8 * @param {boolean} canBeEdited |
9 * @param {boolean} canBeRemoved | 9 * @param {boolean} canBeRemoved |
10 * @return {!SearchEngine} | 10 * @return {!SearchEngine} |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 var browserProxy = null; | 330 var browserProxy = null; |
331 | 331 |
332 setup(function() { | 332 setup(function() { |
333 browserProxy = new settings_search.TestSearchEnginesBrowserProxy(); | 333 browserProxy = new settings_search.TestSearchEnginesBrowserProxy(); |
334 settings.SearchEnginesBrowserProxyImpl.instance_ = browserProxy; | 334 settings.SearchEnginesBrowserProxyImpl.instance_ = browserProxy; |
335 PolymerTest.clearBody(); | 335 PolymerTest.clearBody(); |
336 entry = document.createElement('settings-omnibox-extension-entry'); | 336 entry = document.createElement('settings-omnibox-extension-entry'); |
337 entry.set('engine', createSampleOmniboxExtension()); | 337 entry.set('engine', createSampleOmniboxExtension()); |
338 document.body.appendChild(entry); | 338 document.body.appendChild(entry); |
| 339 |
| 340 // Open action menu. |
| 341 MockInteractions.tap(entry.$$('paper-icon-button')); |
339 }); | 342 }); |
340 | 343 |
341 teardown(function() { entry.remove(); }); | 344 teardown(function() { entry.remove(); }); |
342 | 345 |
343 test('Manage', function() { | 346 test('Manage', function() { |
344 var manageButton = entry.$.manage; | 347 var manageButton = entry.$.manage; |
345 assertTrue(!!manageButton); | 348 assertTrue(!!manageButton); |
346 MockInteractions.tap(manageButton); | 349 MockInteractions.tap(manageButton); |
347 return browserProxy.whenCalled('manageExtension').then( | 350 return browserProxy.whenCalled('manageExtension').then( |
348 function(extensionId) { | 351 function(extensionId) { |
(...skipping 15 matching lines...) Expand all Loading... |
364 | 367 |
365 return { | 368 return { |
366 registerTests: function() { | 369 registerTests: function() { |
367 registerDialogTests(); | 370 registerDialogTests(); |
368 registerSearchEngineEntryTests(); | 371 registerSearchEngineEntryTests(); |
369 registerOmniboxExtensionEntryTests(); | 372 registerOmniboxExtensionEntryTests(); |
370 registerPageTests(); | 373 registerPageTests(); |
371 }, | 374 }, |
372 }; | 375 }; |
373 }); | 376 }); |
OLD | NEW |