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 * @fileoverview Tests for chrome://bluetooth-internals | 6 * @fileoverview Tests for chrome://bluetooth-internals |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** @const {string} Path to source root. */ | 9 /** @const {string} Path to source root. */ |
| 10 var ROOT_PATH = '../../../../'; | 10 var ROOT_PATH = '../../../../'; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 return { | 300 return { |
| 301 id: 'characteristic1', | 301 id: 'characteristic1', |
| 302 uuid: '00002a19-0000-1000-8000-00805f9b34fb', | 302 uuid: '00002a19-0000-1000-8000-00805f9b34fb', |
| 303 properties: Number.MAX_SAFE_INTEGER, | 303 properties: Number.MAX_SAFE_INTEGER, |
| 304 permissions: Number.MAX_SAFE_INTEGER, | 304 permissions: Number.MAX_SAFE_INTEGER, |
| 305 last_known_value: [], | 305 last_known_value: [], |
| 306 }; | 306 }; |
| 307 }, | 307 }, |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 // Flaky on Debug and ASAN. See crbug.com/707530 | 310 TEST_F('BluetoothInternalsTest', 'Startup_BluetoothInternals', |
|
dpapad
2017/04/20 01:38:06
FWIW, I am planning to disable all WebUI tests in
| |
| 311 GEN('#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER)'); | |
| 312 GEN('#define MAYBE_Startup_BluetoothInternals ' + | |
| 313 'DISABLED_Startup_BluetoothInternals'); | |
| 314 GEN('#else'); | |
| 315 GEN('#define MAYBE_Startup_BluetoothInternals Startup_BluetoothInternals'); | |
| 316 GEN('#endif'); | |
| 317 | |
| 318 TEST_F('BluetoothInternalsTest', 'MAYBE_Startup_BluetoothInternals', | |
| 319 function() { | 311 function() { |
| 320 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 312 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
| 321 | 313 |
| 322 var adapterFactory = null; | 314 var adapterFactory = null; |
| 323 var adapterFieldSet = null; | 315 var adapterFieldSet = null; |
| 324 var deviceTable = null; | 316 var deviceTable = null; |
| 325 var sidebarNode = null; | 317 var sidebarNode = null; |
| 326 var pageNames = ['adapter', 'devices']; | 318 var pageNames = ['adapter', 'devices']; |
| 327 | 319 |
| 328 var fakeAdapterInfo = this.fakeAdapterInfo; | 320 var fakeAdapterInfo = this.fakeAdapterInfo; |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 670 | 662 |
| 671 function next() { | 663 function next() { |
| 672 assertTrue(false); | 664 assertTrue(false); |
| 673 } | 665 } |
| 674 | 666 |
| 675 whenSnackbarShows(snackbar2).then(next); | 667 whenSnackbarShows(snackbar2).then(next); |
| 676 snackbar2.addEventListener('dismissed', next); | 668 snackbar2.addEventListener('dismissed', next); |
| 677 whenSnackbarShows(snackbar3).then(next); | 669 whenSnackbarShows(snackbar3).then(next); |
| 678 snackbar3.addEventListener('dismissed', next); | 670 snackbar3.addEventListener('dismissed', next); |
| 679 | 671 |
| 680 whenSnackbarShows(snackbar1).then(function() { | 672 return whenSnackbarShows(snackbar1).then(function() { |
| 681 return snackbar.Snackbar.dismiss(true); | 673 return snackbar.Snackbar.dismiss(true); |
| 682 }).then(function() { | 674 }).then(function() { |
| 683 expectEquals(0, snackbar.Snackbar.queue_.length); | 675 expectEquals(0, snackbar.Snackbar.queue_.length); |
| 684 expectFalse(!!snackbar.Snackbar.current_); | 676 expectFalse(!!snackbar.Snackbar.current_); |
| 685 }).then(finishSnackbarTest); | 677 }).then(finishSnackbarTest); |
| 686 }); | 678 }); |
| 687 | 679 |
| 688 /* AdapterPage Tests */ | 680 /* AdapterPage Tests */ |
| 689 function checkAdapterFieldSet(adapterInfo) { | 681 function checkAdapterFieldSet(adapterInfo) { |
| 690 for (var propName in adapterInfo) { | 682 for (var propName in adapterInfo) { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 942 test('ValueControl_ConvertValue_Decimal_ThreeValues', function() { | 934 test('ValueControl_ConvertValue_Decimal_ThreeValues', function() { |
| 943 valueControl.typeSelect_.value = ValueDataType.DECIMAL | 935 valueControl.typeSelect_.value = ValueDataType.DECIMAL |
| 944 valueControl.value_.setAs(ValueDataType.DECIMAL, '97-98-99' /* abc */); | 936 valueControl.value_.setAs(ValueDataType.DECIMAL, '97-98-99' /* abc */); |
| 945 expectDeepEquals([aCode, bCode, cCode], valueControl.value_.getArray()); | 937 expectDeepEquals([aCode, bCode, cCode], valueControl.value_.getArray()); |
| 946 }); | 938 }); |
| 947 }); | 939 }); |
| 948 | 940 |
| 949 // Run all registered tests. | 941 // Run all registered tests. |
| 950 mocha.run(); | 942 mocha.run(); |
| 951 }); | 943 }); |
| OLD | NEW |