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

Side by Side Diff: Source/modules/indexeddb/IDBTransactionTest.cpp

Issue 176853004: Oilpan: move core/fileapi to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 9 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
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.cpp ('k') | Source/modules/mediasource/SourceBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 private: 76 private:
77 FakeWebIDBDatabase() { } 77 FakeWebIDBDatabase() { }
78 }; 78 };
79 79
80 class FakeIDBDatabaseCallbacks FINAL : public IDBDatabaseCallbacks { 80 class FakeIDBDatabaseCallbacks FINAL : public IDBDatabaseCallbacks {
81 public: 81 public:
82 static PassRefPtr<FakeIDBDatabaseCallbacks> create() { return adoptRef(new F akeIDBDatabaseCallbacks()); } 82 static PassRefPtr<FakeIDBDatabaseCallbacks> create() { return adoptRef(new F akeIDBDatabaseCallbacks()); }
83 virtual void onVersionChange(int64_t oldVersion, int64_t newVersion) OVERRID E { } 83 virtual void onVersionChange(int64_t oldVersion, int64_t newVersion) OVERRID E { }
84 virtual void onForcedClose() OVERRIDE { } 84 virtual void onForcedClose() OVERRIDE { }
85 virtual void onAbort(int64_t transactionId, PassRefPtr<DOMError> error) OVER RIDE { } 85 virtual void onAbort(int64_t transactionId, PassRefPtrWillBeRawPtr<DOMError> error) OVERRIDE { }
86 virtual void onComplete(int64_t transactionId) OVERRIDE { } 86 virtual void onComplete(int64_t transactionId) OVERRIDE { }
87 private: 87 private:
88 FakeIDBDatabaseCallbacks() { } 88 FakeIDBDatabaseCallbacks() { }
89 }; 89 };
90 90
91 TEST_F(IDBTransactionTest, EnsureLifetime) 91 TEST_F(IDBTransactionTest, EnsureLifetime)
92 { 92 {
93 OwnPtr<FakeWebIDBDatabase> backend = FakeWebIDBDatabase::create(); 93 OwnPtr<FakeWebIDBDatabase> backend = FakeWebIDBDatabase::create();
94 RefPtr<FakeIDBDatabaseCallbacks> connection = FakeIDBDatabaseCallbacks::crea te(); 94 RefPtr<FakeIDBDatabaseCallbacks> connection = FakeIDBDatabaseCallbacks::crea te();
95 RefPtr<IDBDatabase> db = IDBDatabase::create(executionContext(), backend.rel ease(), connection); 95 RefPtr<IDBDatabase> db = IDBDatabase::create(executionContext(), backend.rel ease(), connection);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 // Fire an abort to make sure this doesn't free the transaction during use. The test 145 // Fire an abort to make sure this doesn't free the transaction during use. The test
146 // will not fail if it is, but ASAN would notice the error. 146 // will not fail if it is, but ASAN would notice the error.
147 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted")); 147 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted"));
148 148
149 // onAbort() should have cleared the transaction's reference to the database . 149 // onAbort() should have cleared the transaction's reference to the database .
150 EXPECT_EQ(1, db->refCount()); 150 EXPECT_EQ(1, db->refCount());
151 } 151 }
152 152
153 } // namespace 153 } // namespace
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.cpp ('k') | Source/modules/mediasource/SourceBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698