| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |