Compute more accurate bound on expected work when tracing.

BUG=
R=floitsch@google.com, sra@google.com

Review URL: https://codereview.chromium.org//726383003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41795 260f80e4-7a28-3924-810f-c04153c831b5
Check enums in switch cases.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//710343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41796 260f80e4-7a28-3924-810f-c04153c831b5
Fix bug in the unittest's withTestEnvironment package and apply more feedback from nweiz.

BUG=
R=kustermann@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//734343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@41798 260f80e4-7a28-3924-810f-c04153c831b5