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

Unified Diff: dart/tests/compiler/dart2js_native/native_null_closure_frog_test.dart

Issue 11973018: Improve decoding of JS TypeError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update status files Created 7 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
Index: dart/tests/compiler/dart2js_native/native_null_closure_frog_test.dart
diff --git a/dart/tests/compiler/dart2js_native/native_null_closure_frog_test.dart b/dart/tests/compiler/dart2js_native/native_null_closure_frog_test.dart
index adba407abbedff72d242573bd822c755b6d3ed50..6c083751b7175ed9c4cc628184616f9cd791261f 100644
--- a/dart/tests/compiler/dart2js_native/native_null_closure_frog_test.dart
+++ b/dart/tests/compiler/dart2js_native/native_null_closure_frog_test.dart
@@ -2,6 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// Test that exception unwrapping handle cases like ({foo:null}).foo().
ngeoffray 2013/07/22 09:08:56 Does this test really help you knowing? There coul
ahe 2013/07/22 10:45:27 I just tried to fix an existing test. This is all
+
+import 'dart:_js_helper';
+
import "package:expect/expect.dart";
typedef void MyFunctionType();
@@ -22,7 +26,6 @@ A.prototype.invoke = function() { return this.f(); };
makeA = function(){return new A;};
""";
-
main() {
setup();
A a = makeA();
@@ -31,7 +34,8 @@ main() {
bool caughtException = false;
try {
a.invoke();
- } on Exception catch (e) {
+ } on JsNoSuchMethodError catch (e) {
+ print(e);
caughtException = true;
}
Expect.isTrue(caughtException);

Powered by Google App Engine
This is Rietveld 408576698