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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 15138002: Added tests to previously broken functionality and added null checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 library dart.dom.indexed_db; 1 library dart.dom.indexed_db;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:html'; 4 import 'dart:html';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
8 import 'dart:_foreign_helper' show JS; 8 import 'dart:_foreign_helper' show JS;
9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
10 // for details. All rights reserved. Use of this source code is governed by a 10 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 Request $dom_clear() native; 893 Request $dom_clear() native;
894 894
895 @JSName('count') 895 @JSName('count')
896 @DomName('IDBObjectStore.count') 896 @DomName('IDBObjectStore.count')
897 @DocsEditable 897 @DocsEditable
898 Request $dom_count([key_OR_range]) native; 898 Request $dom_count([key_OR_range]) native;
899 899
900 @DomName('IDBObjectStore.createIndex') 900 @DomName('IDBObjectStore.createIndex')
901 @DocsEditable 901 @DocsEditable
902 Index $dom_createIndex(String name, keyPath, [Map options]) { 902 Index $dom_createIndex(String name, keyPath, [Map options]) {
903 if ((keyPath is List<String> || keyPath == null) && !?options) { 903 if (keyPath is List<String> && keyPath != null && !?options) {
904 List keyPath_1 = convertDartToNative_StringArray(keyPath); 904 List keyPath_1 = convertDartToNative_StringArray(keyPath);
905 return _$dom_createIndex_1(name, keyPath_1); 905 return _$dom_createIndex_1(name, keyPath_1);
906 } 906 }
907 if ((keyPath is List<String> || keyPath == null)) { 907 if (keyPath is List<String> && keyPath != null) {
blois 2013/05/13 21:09:16 keyPath is List<String> && keyPath != null is over
908 List keyPath_2 = convertDartToNative_StringArray(keyPath); 908 List keyPath_2 = convertDartToNative_StringArray(keyPath);
909 var options_3 = convertDartToNative_Dictionary(options); 909 var options_3 = convertDartToNative_Dictionary(options);
910 return _$dom_createIndex_2(name, keyPath_2, options_3); 910 return _$dom_createIndex_2(name, keyPath_2, options_3);
911 } 911 }
912 if ((keyPath is String || keyPath == null) && !?options) { 912 if (keyPath is String && keyPath != null && !?options) {
913 return _$dom_createIndex_3(name, keyPath); 913 return _$dom_createIndex_3(name, keyPath);
914 } 914 }
915 if ((keyPath is String || keyPath == null)) { 915 if (keyPath is String && keyPath != null) {
916 var options_4 = convertDartToNative_Dictionary(options); 916 var options_4 = convertDartToNative_Dictionary(options);
917 return _$dom_createIndex_4(name, keyPath, options_4); 917 return _$dom_createIndex_4(name, keyPath, options_4);
918 } 918 }
919 throw new ArgumentError("Incorrect number or type of arguments"); 919 throw new ArgumentError("Incorrect number or type of arguments");
920 } 920 }
921 @JSName('createIndex') 921 @JSName('createIndex')
922 @DomName('IDBObjectStore.createIndex') 922 @DomName('IDBObjectStore.createIndex')
923 @DocsEditable 923 @DocsEditable
924 Index _$dom_createIndex_1(name, List keyPath) native; 924 Index _$dom_createIndex_1(name, List keyPath) native;
925 @JSName('createIndex') 925 @JSName('createIndex')
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 } 1239 }
1240 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1240 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1241 // for details. All rights reserved. Use of this source code is governed by a 1241 // for details. All rights reserved. Use of this source code is governed by a
1242 // BSD-style license that can be found in the LICENSE file. 1242 // BSD-style license that can be found in the LICENSE file.
1243 1243
1244 1244
1245 @DocsEditable 1245 @DocsEditable
1246 @DomName('IDBAny') 1246 @DomName('IDBAny')
1247 abstract class _IDBAny native "IDBAny" { 1247 abstract class _IDBAny native "IDBAny" {
1248 } 1248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698