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

Side by Side Diff: Source/WebKit/chromium/tests/IDBRequestTest.cpp

Issue 17060008: Add dataLoss property to IDB's upgradeneeded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add blink API stub for compatibility with and without chromium changes Created 7 years, 6 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 /* 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
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
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp ('k') | Source/modules/indexeddb/IDBCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698