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

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

Issue 308963003: Disable IDBTransactionTest.EnsureLifetime if ENABLE(OILPAN). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 public: 79 public:
80 static FakeIDBDatabaseCallbacks* create() { return new FakeIDBDatabaseCallba cks(); } 80 static FakeIDBDatabaseCallbacks* create() { return new FakeIDBDatabaseCallba cks(); }
81 virtual void onVersionChange(int64_t oldVersion, int64_t newVersion) OVERRID E { } 81 virtual void onVersionChange(int64_t oldVersion, int64_t newVersion) OVERRID E { }
82 virtual void onForcedClose() OVERRIDE { } 82 virtual void onForcedClose() OVERRIDE { }
83 virtual void onAbort(int64_t transactionId, PassRefPtrWillBeRawPtr<DOMError> error) OVERRIDE { } 83 virtual void onAbort(int64_t transactionId, PassRefPtrWillBeRawPtr<DOMError> error) OVERRIDE { }
84 virtual void onComplete(int64_t transactionId) OVERRIDE { } 84 virtual void onComplete(int64_t transactionId) OVERRIDE { }
85 private: 85 private:
86 FakeIDBDatabaseCallbacks() { } 86 FakeIDBDatabaseCallbacks() { }
87 }; 87 };
88 88
89 TEST_F(IDBTransactionTest, EnsureLifetime) 89 // crbug.com/379616
90 #if ENABLE(OILPAN)
91 #define MAYBE_EnsureLifetime DISABLED_EnsureLifetime
92 #else
93 #define MAYBE_EnsureLifetime EnsureLifetime
94 #endif
95 TEST_F(IDBTransactionTest, MAYBE_EnsureLifetime)
90 { 96 {
91 OwnPtr<FakeWebIDBDatabase> backend = FakeWebIDBDatabase::create(); 97 OwnPtr<FakeWebIDBDatabase> backend = FakeWebIDBDatabase::create();
92 Persistent<IDBDatabase> db = IDBDatabase::create(executionContext(), backend .release(), FakeIDBDatabaseCallbacks::create()); 98 Persistent<IDBDatabase> db = IDBDatabase::create(executionContext(), backend .release(), FakeIDBDatabaseCallbacks::create());
93 99
94 const int64_t transactionId = 1234; 100 const int64_t transactionId = 1234;
95 const Vector<String> transactionScope; 101 const Vector<String> transactionScope;
96 Persistent<IDBTransaction> transaction = IDBTransaction::create(executionCon text(), transactionId, transactionScope, blink::WebIDBDatabase::TransactionReadO nly, db.get()); 102 Persistent<IDBTransaction> transaction = IDBTransaction::create(executionCon text(), transactionId, transactionScope, blink::WebIDBDatabase::TransactionReadO nly, db.get());
97 PersistentHeapHashSet<WeakMember<IDBTransaction> > set; 103 PersistentHeapHashSet<WeakMember<IDBTransaction> > set;
98 set.add(transaction); 104 set.add(transaction);
99 105
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Fire an abort to make sure this doesn't free the transaction during use. The test 152 // Fire an abort to make sure this doesn't free the transaction during use. The test
147 // will not fail if it is, but ASAN would notice the error. 153 // will not fail if it is, but ASAN would notice the error.
148 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted")); 154 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted"));
149 155
150 // onAbort() should have cleared the transaction's reference to the database . 156 // onAbort() should have cleared the transaction's reference to the database .
151 Heap::collectAllGarbage(); 157 Heap::collectAllGarbage();
152 EXPECT_EQ(0u, set.size()); 158 EXPECT_EQ(0u, set.size());
153 } 159 }
154 160
155 } // namespace 161 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698