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

Unified Diff: packages/js_util/test/js_util_test.dart

Issue 2312183003: Removed Polymer from Observatory deps (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/js_util/pubspec.yaml ('k') | packages/js_util/test/js_util_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/js_util/test/js_util_test.dart
diff --git a/packages/js_util/test/js_util_test.dart b/packages/js_util/test/js_util_test.dart
deleted file mode 100644
index 8252c2380c9559dab4165dda02fe16b4982dccf6..0000000000000000000000000000000000000000
--- a/packages/js_util/test/js_util_test.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-@JS()
-library js_util.test;
-
-import 'package:js/js.dart';
-import 'package:js_util/js_util.dart';
-import 'package:test/test.dart';
-
-@JS('JSON.stringify')
-external String stringify(Object json);
-
-void main() {
- group('js_util tests', () {
- test('defineProperty test', () {
- final obj = newObject();
- defineProperty(
- obj, 'foo', new PropertyDescription(enumerable: true, value: 1));
- defineProperty(
- obj, 'bar', new PropertyDescription(enumerable: false, value: 2));
-
- expect(stringify(obj), '{"foo":1}');
- });
-
- test('newObject/setValue/getValue test', () {
- final obj = newObject();
- setValue(obj, 'foo', 1);
- setValue(obj, 'bar', 2);
-
- expect(getValue(obj, 'foo'), equals(1));
- expect(getValue(obj, 'bar'), equals(2));
- });
-
- test('toJS test', () {
- final jsObj = toJS({
- 'people': [
- {'firstName': 'Kwang Yul', 'lastName': 'Seo'},
- {'firstName': 'DoHyung', 'lastName': 'Kim'},
- {'firstName': 'Kyusun', 'lastName': 'Kim'}
- ]
- });
-
- final people = getValue(jsObj, 'people');
- expect(getValue(people[0], 'firstName'), equals('Kwang Yul'));
- expect(getValue(people[0], 'lastName'), equals('Seo'));
- expect(getValue(people[1], 'firstName'), equals('DoHyung'));
- expect(getValue(people[1], 'lastName'), equals('Kim'));
- expect(getValue(people[2], 'firstName'), equals('Kyusun'));
- expect(getValue(people[2], 'lastName'), equals('Kim'));
- });
- });
-}
« no previous file with comments | « packages/js_util/pubspec.yaml ('k') | packages/js_util/test/js_util_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698