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

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

Issue 14267029: Prepare to eliminate WebDOMStringList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix names duplication in conversion Created 7 years, 8 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 v8::HandleScope handleScope; 86 v8::HandleScope handleScope;
87 v8::Context::Scope scope(context()); 87 v8::Context::Scope scope(context());
88 88
89 IDBTransaction* transaction = 0; 89 IDBTransaction* transaction = 0;
90 RefPtr<IDBRequest> request = IDBRequest::create(scriptExecutionContext(), ID BAny::createInvalid(), transaction); 90 RefPtr<IDBRequest> request = IDBRequest::create(scriptExecutionContext(), ID BAny::createInvalid(), transaction);
91 EXPECT_EQ(request->readyState(), "pending"); 91 EXPECT_EQ(request->readyState(), "pending");
92 scriptExecutionContext()->stopActiveDOMObjects(); 92 scriptExecutionContext()->stopActiveDOMObjects();
93 93
94 // Ensure none of the following raise assertions in stopped state: 94 // Ensure none of the following raise assertions in stopped state:
95 request->onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, "Description goes here.")); 95 request->onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, "Description goes here."));
96 request->onSuccess(DOMStringList::create()); 96 request->onSuccess(Vector<String>());
97 request->onSuccess(PassRefPtr<IDBCursorBackendInterface>(), IDBKey::createIn valid(), IDBKey::createInvalid(), 0); 97 request->onSuccess(PassRefPtr<IDBCursorBackendInterface>(), IDBKey::createIn valid(), IDBKey::createInvalid(), 0);
98 request->onSuccess(IDBKey::createInvalid()); 98 request->onSuccess(IDBKey::createInvalid());
99 request->onSuccess(PassRefPtr<SharedBuffer>(0)); 99 request->onSuccess(PassRefPtr<SharedBuffer>(0));
100 request->onSuccess(PassRefPtr<SharedBuffer>(0), IDBKey::createInvalid(), IDB KeyPath()); 100 request->onSuccess(PassRefPtr<SharedBuffer>(0), IDBKey::createInvalid(), IDB KeyPath());
101 request->onSuccess(0LL); 101 request->onSuccess(0LL);
102 request->onSuccess(); 102 request->onSuccess();
103 request->onSuccess(IDBKey::createInvalid(), IDBKey::createInvalid(), 0); 103 request->onSuccess(IDBKey::createInvalid(), IDBKey::createInvalid(), 0);
104 } 104 }
105 105
106 TEST_F(IDBRequestTest, AbortErrorAfterAbort) 106 TEST_F(IDBRequestTest, AbortErrorAfterAbort)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 RefPtr<MockIDBDatabaseBackendInterface> interface = MockIDBDatabaseBacke ndInterface::create(); 188 RefPtr<MockIDBDatabaseBackendInterface> interface = MockIDBDatabaseBacke ndInterface::create();
189 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(scriptExecut ionContext(), callbacks, transactionId, version); 189 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(scriptExecut ionContext(), callbacks, transactionId, version);
190 EXPECT_EQ(request->readyState(), "pending"); 190 EXPECT_EQ(request->readyState(), "pending");
191 191
192 scriptExecutionContext()->stopActiveDOMObjects(); 192 scriptExecutionContext()->stopActiveDOMObjects();
193 request->onSuccess(interface, metadata);; 193 request->onSuccess(interface, metadata);;
194 } 194 }
195 } 195 }
196 196
197 } // namespace 197 } // namespace
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/tests/IDBDatabaseBackendTest.cpp ('k') | Source/modules/indexeddb/IDBCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698