mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
Attempted fix for Firefox flakiness.
BUG=http://dartbug.com/19042 R=ricow@google.com Review URL: https://codereview.chromium.org//302813002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36733 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
0e172b7de7
commit
dad61e5ff2
|
@ -391,7 +391,6 @@ websql_test/supported: Fail
|
||||||
messageevent_test: RuntimeError # Issue 15651
|
messageevent_test: RuntimeError # Issue 15651
|
||||||
serialized_script_value_test: RuntimeError # Issue 15651
|
serialized_script_value_test: RuntimeError # Issue 15651
|
||||||
client_rect_test: Fail # Issue 16890
|
client_rect_test: Fail # Issue 16890
|
||||||
worker_test/functional: Pass, RuntimeError # http://dartbug.com/19042
|
|
||||||
|
|
||||||
[ $runtime == ff ]
|
[ $runtime == ff ]
|
||||||
xhr_test/xhr: Pass, Fail # Issue 11602
|
xhr_test/xhr: Pass, Fail # Issue 11602
|
||||||
|
|
|
@ -21,11 +21,17 @@ main() {
|
||||||
group('functional', () {
|
group('functional', () {
|
||||||
|
|
||||||
test('unsupported', () {
|
test('unsupported', () {
|
||||||
var expectation = Worker.supported ? returnsNormally : throws;
|
if (!Worker.supported) {
|
||||||
|
expect(() => new Worker('worker.js'), throws);
|
||||||
expect(() {
|
} else {
|
||||||
new Worker('worker.js');
|
new Worker('worker.js').onError.first.then(expectAsync((e) {
|
||||||
}, expectation);
|
// This event is expected, "worker.js" doesn't exist. But the event
|
||||||
|
// *sometimes* propagates to window.onerror in Firefox which causes
|
||||||
|
// this test to fail, so let's stop any further propagation:
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
}));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!Worker.supported) {
|
if (!Worker.supported) {
|
||||||
|
|
Loading…
Reference in a new issue