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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp

Issue 2870803002: Rename IDBRequest::On* callbacks to IDBRequest::Enqueue*. (Closed)
Patch Set: De-virtualized one more callback. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
index b36b543a4efa26f63f0e2b5e3a43257dddddf23a..2cc605b92be177cc53feff78606da72fe3ffb058 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
@@ -59,16 +59,17 @@ TEST(IDBRequestTest, EventsAfterStopping) {
scope.GetExecutionContext()->NotifyContextDestroyed();
// Ensure none of the following raise assertions in stopped state:
- request->OnError(DOMException::Create(kAbortError, "Description goes here."));
- request->OnSuccess(Vector<String>());
- request->OnSuccess(nullptr, IDBKey::CreateInvalid(), IDBKey::CreateInvalid(),
- IDBValue::Create());
- request->OnSuccess(IDBKey::CreateInvalid());
- request->OnSuccess(IDBValue::Create());
- request->OnSuccess(static_cast<int64_t>(0));
- request->OnSuccess();
- request->OnSuccess(IDBKey::CreateInvalid(), IDBKey::CreateInvalid(),
- IDBValue::Create());
+ request->EnqueueResponse(
+ DOMException::Create(kAbortError, "Description goes here."));
+ request->EnqueueResponse(Vector<String>());
+ request->EnqueueResponse(nullptr, IDBKey::CreateInvalid(),
+ IDBKey::CreateInvalid(), IDBValue::Create());
+ request->EnqueueResponse(IDBKey::CreateInvalid());
+ request->EnqueueResponse(IDBValue::Create());
+ request->EnqueueResponse(static_cast<int64_t>(0));
+ request->EnqueueResponse();
+ request->EnqueueResponse(IDBKey::CreateInvalid(), IDBKey::CreateInvalid(),
+ IDBValue::Create());
}
TEST(IDBRequestTest, AbortErrorAfterAbort) {
@@ -84,7 +85,8 @@ TEST(IDBRequestTest, AbortErrorAfterAbort) {
// Now simulate the back end having fired an abort error at the request to
// clear up any intermediaries. Ensure an assertion is not raised.
- request->OnError(DOMException::Create(kAbortError, "Description goes here."));
+ request->EnqueueResponse(
+ DOMException::Create(kAbortError, "Description goes here."));
// Stop the request lest it be GCed and its destructor
// finds the object in a pending state (and asserts.)

Powered by Google App Engine
This is Rietveld 408576698