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

Unified Diff: test/browser/language_tests.js

Issue 1968323002: Work around is check issue causing zone error handlers to never fire. Update test expectations to r… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: ptal Created 4 years, 7 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 | « lib/runtime/dart_sdk.js ('k') | tool/input_sdk/lib/async/zone.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/browser/language_tests.js
diff --git a/test/browser/language_tests.js b/test/browser/language_tests.js
index 56699055bd04206ad87a7bb9c6dce93d2e47a0bb..9945af51b280cd8a99816ae54331cdaa6ffdaca7 100644
--- a/test/browser/language_tests.js
+++ b/test/browser/language_tests.js
@@ -27,7 +27,8 @@
// The number of expected unittest errors should be zero but unfortunately
// there are a lot of broken html unittests.
- let num_expected_unittest_errors = 5;
+ let num_expected_unittest_fails = 3;
+ let num_expected_unittest_errors = 2;
// TODO(jmesserly): separate StrongModeError from other errors.
let all_status = {
@@ -473,6 +474,7 @@
// TODO(rnystrom): Strong mode cast failures.
'codec1_test': skip_fail,
'encoding_test': skip_fail,
+ 'html_escape_test': fail,
// TODO(rnystrom): If this test is enabled, karma gets confused and
// disconnects randomly.
@@ -672,6 +674,11 @@
},
};
+ function countMatches(text, regex) {
+ let matches = text.match(regex);
+ return matches ? matches.length : 0;
+ }
+
let unittest_tests = [];
let languageTestPattern = new RegExp('(.*)/([^/]*_test[^/]*)');
@@ -767,6 +774,7 @@
// In practice we are really just suppressing all mocha test behavior while
// Dart unittests run and then re-enabling it when the dart tests complete.
test('run all dart unittests', function(done) { // 'function' to allow `this.timeout`
+ this.timeout(100000000);
this.enableTimeouts(false);
// Suppress mocha on-error handling because it will mess up unittests.
mochaOnError = window.onerror;
@@ -781,11 +789,14 @@
window.onerror = mochaOnError;
this.enableTimeouts(true);
- var matches = output.match(/ERROR/g);
- let numErrors = matches ? matches.length : 0;
- if (numErrors != num_expected_unittest_errors) {
- output = "Expected " + num_expected_unittest_errors +
- " failing unittests, got " + numErrors + ".\n" + output;
+ let numErrors = countMatches(output, /\d\s+ERROR/g);
+ let numFails = countMatches(output, /\d\s+FAIL/g);
+ if (numErrors != num_expected_unittest_errors ||
+ numFails != num_expected_unittest_fails) {
+ output = "Expected " + num_expected_unittest_fails +
+ " fail and " + num_expected_unittest_errors +
+ " error unittests, got " + numFails + " fail and " +
+ numErrors + "error tests.\n" + output;
console.error(output);
done(new Error(output));
} else {
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | tool/input_sdk/lib/async/zone.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698