Observatory strong mode fix: Fix a callback parameter type using an explicit downcast.

For brevity we explicitly downcast the parameter type (using "as")
rather than implicitly downcasting it (by assigning to a fresh
variable).  Since this is test code, I'm not concerned about the
performance penalty of the explicit downcast.

Change-Id: I2bf1556ec11db124978c6631df8fcdd5adbc298d
Reviewed-on: https://dart-review.googlesource.com/56701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
diff --git a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
index 472bc70..5fe996a 100644
--- a/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/allocation_profile/element_test.dart
@@ -89,7 +89,7 @@
       e
           .querySelectorAll(rTag)
           .sublist(1, 4)
-          .forEach((NavRefreshElement e) => e.refresh());
+          .forEach((e) => (e as NavRefreshElement).refresh());
       e.remove();
       await e.onRendered.first;
       expect(e.children.length, isZero, reason: 'is empty');