OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 const int64_t oldVersion = 0; | 173 const int64_t oldVersion = 0; |
174 const IDBDatabaseMetadata metadata; | 174 const IDBDatabaseMetadata metadata; |
175 RefPtr<IDBDatabaseCallbacksImpl> callbacks = IDBDatabaseCallbacksImpl::creat
e(); | 175 RefPtr<IDBDatabaseCallbacksImpl> callbacks = IDBDatabaseCallbacksImpl::creat
e(); |
176 | 176 |
177 { | 177 { |
178 RefPtr<MockIDBDatabaseBackendInterface> interface = MockIDBDatabaseBacke
ndInterface::create(); | 178 RefPtr<MockIDBDatabaseBackendInterface> interface = MockIDBDatabaseBacke
ndInterface::create(); |
179 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(scriptExecut
ionContext(), callbacks, transactionId, version); | 179 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(scriptExecut
ionContext(), callbacks, transactionId, version); |
180 EXPECT_EQ(request->readyState(), "pending"); | 180 EXPECT_EQ(request->readyState(), "pending"); |
181 | 181 |
182 scriptExecutionContext()->stopActiveDOMObjects(); | 182 scriptExecutionContext()->stopActiveDOMObjects(); |
183 request->onUpgradeNeeded(oldVersion, interface, metadata); | 183 request->onUpgradeNeeded(oldVersion, interface, metadata, WebKit::WebIDB
Callbacks::DataLossNone); |
184 } | 184 } |
185 | 185 |
186 { | 186 { |
187 RefPtr<MockIDBDatabaseBackendInterface> interface = MockIDBDatabaseBacke
ndInterface::create(); | 187 RefPtr<MockIDBDatabaseBackendInterface> interface = MockIDBDatabaseBacke
ndInterface::create(); |
188 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(scriptExecut
ionContext(), callbacks, transactionId, version); | 188 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(scriptExecut
ionContext(), callbacks, transactionId, version); |
189 EXPECT_EQ(request->readyState(), "pending"); | 189 EXPECT_EQ(request->readyState(), "pending"); |
190 | 190 |
191 scriptExecutionContext()->stopActiveDOMObjects(); | 191 scriptExecutionContext()->stopActiveDOMObjects(); |
192 request->onSuccess(interface, metadata);; | 192 request->onSuccess(interface, metadata);; |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 } // namespace | 196 } // namespace |
OLD | NEW |