Skip to content

Allow multiple callback overrides in NgZone #4535

@goderbauer

Description

@goderbauer

Angular seems to only allow one override for onTurnStart and onEventDone in NgZone [1]. The Testability API is overriding these callbacks [2] and we have some internal stuff (see b/24673935) that also overrides it. However, due to the mentioned limitation, only the last registration is actually successful. All earlier registrations are silently ignored.

This is a problem for our webdriver and latency tests because if the testability API looses this race, it will never be able to tell our tests that the angular app is stable. Our test will then time out waiting for the testability api to tell us that the app is stable, which will never happen due to the broken callback registration.

This bug is internally tracked at b/24673935.

[1] https://github.com/angular/angular/blob/master/modules/angular2/src/core/zone/ng_zone.dart#L114
[2] https://github.com/angular/angular/blob/master/modules/angular2/src/core/testability/testability.ts#L25

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort2: daysfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions