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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/interfaces.idl

Issue 2477133002: Import wpt@306326cfe973b6c7019c50879ad03b02825c7539 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 4 years, 1 month 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
1 enum IDBTransactionMode { 1 enum IDBTransactionMode {
2 "readonly", 2 "readonly",
3 "readwrite", 3 "readwrite",
4 "versionchange" 4 "versionchange"
5 }; 5 };
6 6
7 enum IDBRequestReadyState { 7 enum IDBRequestReadyState {
8 "pending", 8 "pending",
9 "done" 9 "done"
10 }; 10 };
11 11
12 [Exposed=(Window,Worker)]
12 interface IDBKeyRange { 13 interface IDBKeyRange {
13 readonly attribute any lower; 14 readonly attribute any lower;
14 readonly attribute any upper; 15 readonly attribute any upper;
15 readonly attribute boolean lowerOpen; 16 readonly attribute boolean lowerOpen;
16 readonly attribute boolean upperOpen; 17 readonly attribute boolean upperOpen;
17 static IDBKeyRange only (any value); 18 static IDBKeyRange only (any value);
18 static IDBKeyRange lowerBound (any lower, optional boolean open = false); 19 static IDBKeyRange lowerBound (any lower, optional boolean open = false);
19 static IDBKeyRange upperBound (any upper, optional boolean open = false); 20 static IDBKeyRange upperBound (any upper, optional boolean open = false);
20 static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false); 21 static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen = false, optional boolean upperOpen = false);
21 }; 22 };
(...skipping 13 matching lines...) Expand all
35 dictionary IDBIndexParameters { 36 dictionary IDBIndexParameters {
36 boolean unique = false; 37 boolean unique = false;
37 boolean multiEntry = false; 38 boolean multiEntry = false;
38 }; 39 };
39 40
40 dictionary IDBVersionChangeEventInit : EventInit { 41 dictionary IDBVersionChangeEventInit : EventInit {
41 unsigned long long oldVersion = 0; 42 unsigned long long oldVersion = 0;
42 unsigned long long? newVersion = null; 43 unsigned long long? newVersion = null;
43 }; 44 };
44 45
46 [Exposed=(Window,Worker)]
45 interface IDBRequest : EventTarget { 47 interface IDBRequest : EventTarget {
46 readonly attribute any result; 48 readonly attribute any result;
47 readonly attribute DOMError error; 49 readonly attribute DOMError error;
48 readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source; 50 readonly attribute (IDBObjectStore or IDBIndex or IDBCursor)? source;
49 readonly attribute IDBTransaction transaction ; 51 readonly attribute IDBTransaction transaction ;
50 readonly attribute IDBRequestReadyState readyState; 52 readonly attribute IDBRequestReadyState readyState;
51 attribute EventHandler onsuccess; 53 attribute EventHandler onsuccess;
52 attribute EventHandler onerror; 54 attribute EventHandler onerror;
53 }; 55 };
54 56
57 [Exposed=(Window,Worker)]
55 interface IDBOpenDBRequest : IDBRequest { 58 interface IDBOpenDBRequest : IDBRequest {
56 attribute EventHandler onblocked; 59 attribute EventHandler onblocked;
57 attribute EventHandler onupgradeneeded; 60 attribute EventHandler onupgradeneeded;
58 }; 61 };
59 62
60 [Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict)] 63 [Exposed=(Window,Worker),
64 Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict)]
61 interface IDBVersionChangeEvent : Event { 65 interface IDBVersionChangeEvent : Event {
62 readonly attribute unsigned long long oldVersion; 66 readonly attribute unsigned long long oldVersion;
63 readonly attribute unsigned long long? newVersion; 67 readonly attribute unsigned long long? newVersion;
64 }; 68 };
65 69
66 [NoInterfaceObject] 70 [NoInterfaceObject]
67 interface IDBEnvironment { 71 interface IDBEnvironment {
68 readonly attribute IDBFactory indexedDB; 72 readonly attribute IDBFactory indexedDB;
69 }; 73 };
70 74
75 [Exposed=(Window,Worker)]
71 interface IDBFactory { 76 interface IDBFactory {
72 IDBOpenDBRequest open (DOMString name, [EnforceRange] optional unsigned long long version); 77 IDBOpenDBRequest open (DOMString name, [EnforceRange] optional unsigned long long version);
73 IDBOpenDBRequest deleteDatabase (DOMString name); 78 IDBOpenDBRequest deleteDatabase (DOMString name);
74 short cmp (any first, any second); 79 short cmp (any first, any second);
75 }; 80 };
76 81
82 [Exposed=(Window,Worker)]
77 interface IDBDatabase : EventTarget { 83 interface IDBDatabase : EventTarget {
78 readonly attribute DOMString name; 84 readonly attribute DOMString name;
79 readonly attribute unsigned long long version; 85 readonly attribute unsigned long long version;
80 readonly attribute DOMStringList objectStoreNames; 86 readonly attribute DOMStringList objectStoreNames;
81 IDBObjectStore createObjectStore (DOMString name, optional IDBObjectStorePar ameters optionalParameters); 87 IDBObjectStore createObjectStore (DOMString name, optional IDBObjectStorePar ameters optionalParameters);
82 void deleteObjectStore (DOMString name); 88 void deleteObjectStore (DOMString name);
83 IDBTransaction transaction ((DOMString or sequence<DOMString>) storeNames, o ptional IDBTransactionMode mode = "readonly"); 89 IDBTransaction transaction ((DOMString or sequence<DOMString>) storeNames, o ptional IDBTransactionMode mode = "readonly");
84 void close (); 90 void close ();
85 attribute EventHandler onabort; 91 attribute EventHandler onabort;
86 attribute EventHandler onclose; 92 attribute EventHandler onclose;
87 attribute EventHandler onerror; 93 attribute EventHandler onerror;
88 attribute EventHandler onversionchange; 94 attribute EventHandler onversionchange;
89 }; 95 };
90 96
97 [Exposed=(Window,Worker)]
91 interface IDBObjectStore { 98 interface IDBObjectStore {
92 attribute DOMString name; 99 attribute DOMString name;
93 readonly attribute any keyPath; 100 readonly attribute any keyPath;
94 readonly attribute DOMStringList indexNames; 101 readonly attribute DOMStringList indexNames;
95 readonly attribute IDBTransaction transaction; 102 readonly attribute IDBTransaction transaction;
96 readonly attribute boolean autoIncrement; 103 readonly attribute boolean autoIncrement;
97 IDBRequest put (any value, optional any key); 104 IDBRequest put (any value, optional any key);
98 IDBRequest add (any value, optional any key); 105 IDBRequest add (any value, optional any key);
99 IDBRequest delete (any key); 106 IDBRequest delete (any key);
100 IDBRequest get (any key); 107 IDBRequest get (any key);
101 IDBRequest clear (); 108 IDBRequest clear ();
102 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next"); 109 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next");
103 IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) k eyPath, optional IDBIndexParameters optionalParameters); 110 IDBIndex createIndex (DOMString name, (DOMString or sequence<DOMString>) k eyPath, optional IDBIndexParameters optionalParameters);
104 IDBIndex index (DOMString name); 111 IDBIndex index (DOMString name);
105 void deleteIndex (DOMString indexName); 112 void deleteIndex (DOMString indexName);
106 IDBRequest count (optional any key); 113 IDBRequest count (optional any key);
107 }; 114 };
108 115
116 [Exposed=(Window,Worker)]
109 interface IDBIndex { 117 interface IDBIndex {
110 attribute DOMString name; 118 attribute DOMString name;
111 readonly attribute IDBObjectStore objectStore; 119 readonly attribute IDBObjectStore objectStore;
112 readonly attribute any keyPath; 120 readonly attribute any keyPath;
113 readonly attribute boolean multiEntry; 121 readonly attribute boolean multiEntry;
114 readonly attribute boolean unique; 122 readonly attribute boolean unique;
115 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next"); 123 IDBRequest openCursor (optional any range, optional IDBCursorDirection direc tion = "next");
116 IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection di rection = "next"); 124 IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection di rection = "next");
117 IDBRequest get (any key); 125 IDBRequest get (any key);
118 IDBRequest getKey (any key); 126 IDBRequest getKey (any key);
119 IDBRequest count (optional any key); 127 IDBRequest count (optional any key);
120 }; 128 };
121 129
130 [Exposed=(Window,Worker)]
122 interface IDBCursor { 131 interface IDBCursor {
123 readonly attribute (IDBObjectStore or IDBIndex) source; 132 readonly attribute (IDBObjectStore or IDBIndex) source;
124 readonly attribute IDBCursorDirection direction; 133 readonly attribute IDBCursorDirection direction;
125 readonly attribute any key; 134 readonly attribute any key;
126 readonly attribute any primaryKey; 135 readonly attribute any primaryKey;
127 IDBRequest update (any value); 136 IDBRequest update (any value);
128 void advance ([EnforceRange] unsigned long count); 137 void advance ([EnforceRange] unsigned long count);
129 void continue (optional any key); 138 void continue (optional any key);
130 IDBRequest delete (); 139 IDBRequest delete ();
131 }; 140 };
132 141
142 [Exposed=(Window,Worker)]
133 interface IDBCursorWithValue : IDBCursor { 143 interface IDBCursorWithValue : IDBCursor {
134 readonly attribute any value; 144 readonly attribute any value;
135 }; 145 };
136 146
147 [Exposed=(Window,Worker)]
137 interface IDBTransaction : EventTarget { 148 interface IDBTransaction : EventTarget {
138 readonly attribute IDBTransactionMode mode; 149 readonly attribute IDBTransactionMode mode;
139 readonly attribute IDBDatabase db; 150 readonly attribute IDBDatabase db;
140 readonly attribute DOMError error; 151 readonly attribute DOMError error;
141 IDBObjectStore objectStore (DOMString name); 152 IDBObjectStore objectStore (DOMString name);
142 void abort (); 153 void abort ();
143 attribute EventHandler onabort; 154 attribute EventHandler onabort;
144 attribute EventHandler oncomplete; 155 attribute EventHandler oncomplete;
145 attribute EventHandler onerror; 156 attribute EventHandler onerror;
146 }; 157 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698