From d497bdc9f360d0043ffd3ad243894886588b77cb Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Sep 2017 14:20:34 -0700 Subject: [PATCH 1/2] Load Exception --- CHANGELOG.md | 4 ++++ lib/dart.js | 5 +++++ pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bec98e1eb..043828c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.12.24+5 + +* Expose a way for tests to forward a `loadException` to the server. + ## 0.12.24+4 * Drain browser process `stdout` and `stdin`. This resolves test flakiness, especially in Travis diff --git a/lib/dart.js b/lib/dart.js index be430d0f1..70e2b41cf 100644 --- a/lib/dart.js +++ b/lib/dart.js @@ -19,6 +19,11 @@ var sendLoadException = function(message) { }, window.location.origin); } +// Listen for loadException events and forward to the server. +window.addEventListener('loadException', function(e) { + sendLoadException(e.detail); +}); + // The basename of the current page. var name = window.location.href.replace(/.*\//, '').replace(/#.*/, ''); diff --git a/pubspec.yaml b/pubspec.yaml index ee3b3d85a..327f31e5f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: test -version: 0.12.24+4 +version: 0.12.24+5 author: Dart Team description: A library for writing dart unit tests. homepage: https://github.com/dart-lang/test From aad8d1bcfdf6189bb1c683a6db85313d8f59286f Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Sep 2017 14:35:35 -0700 Subject: [PATCH 2/2] change to load exception --- lib/dart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dart.js b/lib/dart.js index 70e2b41cf..0558a2fa8 100644 --- a/lib/dart.js +++ b/lib/dart.js @@ -19,8 +19,8 @@ var sendLoadException = function(message) { }, window.location.origin); } -// Listen for loadException events and forward to the server. -window.addEventListener('loadException', function(e) { +// Listen for dartLoadException events and forward to the server. +window.addEventListener('dartLoadException', function(e) { sendLoadException(e.detail); });