OLD | NEW |
(Empty) | |
| 1 dart_library.library('lib/html/exceptions_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'unittest' |
| 4 ], function load__exceptions_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_config = unittest.html_config; |
| 11 const unittest$ = unittest.unittest; |
| 12 const src__matcher__expect = unittest.src__matcher__expect; |
| 13 const exceptions_test = Object.create(null); |
| 14 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 15 exceptions_test.main = function() { |
| 16 html_config.useHtmlConfiguration(); |
| 17 unittest$.test('EventException', dart.fn(() => { |
| 18 let event = html.Event.new('Event'); |
| 19 try { |
| 20 html.document[dartx.dispatchEvent](event); |
| 21 } catch (e) { |
| 22 if (html.DomException.is(e)) { |
| 23 src__matcher__expect.expect(e[dartx.name], html.DomException.INVALID_S
TATE); |
| 24 } else |
| 25 throw e; |
| 26 } |
| 27 |
| 28 }, VoidTodynamic())); |
| 29 }; |
| 30 dart.fn(exceptions_test.main, VoidTodynamic()); |
| 31 // Exports: |
| 32 exports.exceptions_test = exceptions_test; |
| 33 }); |
OLD | NEW |