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

Side by Side Diff: test/codegen/lib/html/wrapping_collections_test.dart

Issue 1930043002: Add all dart:html tests from the sdk to test/codegen. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 library wrapping_collection_test;
2
3 import 'dart:html';
4 import 'dart:html_common';
5 import 'dart:js' as js;
6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart';
8
9 /// Test that if we access objects through JS-interop we get the
10 /// appropriate objects, even if dart:html maps them.
11 main() {
12 test("Access through JS-interop", () {
13 var performance = js.context['performance'];
14 var entries = performance.callMethod('getEntries', const []);
15 entries.forEach((x) {
16 expect(x is js.JsObject, isTrue);
17 });
18 });
19
20 test("Access through dart:html", () {
21 var dartPerformance = js.JsNative.toTypedObject(js.context['performance']);
22 var dartEntries = dartPerformance.getEntries();
23 dartEntries.forEach((x) {
24 expect(x is PerformanceEntry, isTrue);
25 });
26 });
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698