OLD | NEW |
(Empty) | |
| 1 dart_library.library('lib/html/speechrecognition_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'unittest' |
| 4 ], function load__speechrecognition_test(exports, dart_sdk, unittest) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const html = dart_sdk.html; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const html_individual_config = unittest.html_individual_config; |
| 11 const unittest$ = unittest.unittest; |
| 12 const src__matcher__expect = unittest.src__matcher__expect; |
| 13 const src__matcher__core_matchers = unittest.src__matcher__core_matchers; |
| 14 const src__matcher__throws_matcher = unittest.src__matcher__throws_matcher; |
| 15 const speechrecognition_test = Object.create(null); |
| 16 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 17 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 18 speechrecognition_test.main = function() { |
| 19 html_individual_config.useHtmlIndividualConfiguration(); |
| 20 unittest$.group('supported', dart.fn(() => { |
| 21 unittest$.test('supported', dart.fn(() => { |
| 22 src__matcher__expect.expect(html.SpeechRecognition[dartx.supported], tru
e); |
| 23 }, VoidTodynamic())); |
| 24 }, VoidTovoid())); |
| 25 unittest$.group('types', dart.fn(() => { |
| 26 let expectation = dart.test(html.SpeechRecognition[dartx.supported]) ? src
__matcher__core_matchers.returnsNormally : src__matcher__throws_matcher.throws; |
| 27 unittest$.test('SpeechRecognition', dart.fn(() => { |
| 28 src__matcher__expect.expect(dart.fn(() => { |
| 29 html.SpeechRecognition.new(); |
| 30 }, VoidTodynamic()), expectation); |
| 31 }, VoidTodynamic())); |
| 32 unittest$.test('SpeechRecognitionError', dart.fn(() => { |
| 33 src__matcher__expect.expect(dart.fn(() => { |
| 34 let e = html.Event.eventType('SpeechRecognitionError', 'speech'); |
| 35 src__matcher__expect.expect(html.SpeechRecognitionError.is(e), true); |
| 36 }, VoidTodynamic()), expectation); |
| 37 }, VoidTodynamic())); |
| 38 }, VoidTovoid())); |
| 39 }; |
| 40 dart.fn(speechrecognition_test.main, VoidTodynamic()); |
| 41 // Exports: |
| 42 exports.speechrecognition_test = speechrecognition_test; |
| 43 }); |
OLD | NEW |