Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: test/codegen/expect/lib/html/exceptions_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/expect/lib/html/events_test.js ('k') | test/codegen/expect/lib/html/fileapi_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/lib/html/exceptions_test.js
diff --git a/test/codegen/expect/lib/html/exceptions_test.js b/test/codegen/expect/lib/html/exceptions_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..65c2d5f4a425955053b90a7b3890561b6adc362d
--- /dev/null
+++ b/test/codegen/expect/lib/html/exceptions_test.js
@@ -0,0 +1,33 @@
+dart_library.library('lib/html/exceptions_test', null, /* Imports */[
+ 'dart_sdk',
+ 'unittest'
+], function load__exceptions_test(exports, dart_sdk, unittest) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const html = dart_sdk.html;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const html_config = unittest.html_config;
+ const unittest$ = unittest.unittest;
+ const src__matcher__expect = unittest.src__matcher__expect;
+ const exceptions_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ exceptions_test.main = function() {
+ html_config.useHtmlConfiguration();
+ unittest$.test('EventException', dart.fn(() => {
+ let event = html.Event.new('Event');
+ try {
+ html.document[dartx.dispatchEvent](event);
+ } catch (e) {
+ if (html.DomException.is(e)) {
+ src__matcher__expect.expect(e[dartx.name], html.DomException.INVALID_STATE);
+ } else
+ throw e;
+ }
+
+ }, VoidTodynamic()));
+ };
+ dart.fn(exceptions_test.main, VoidTodynamic());
+ // Exports:
+ exports.exceptions_test = exceptions_test;
+});
« no previous file with comments | « test/codegen/expect/lib/html/events_test.js ('k') | test/codegen/expect/lib/html/fileapi_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698