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: content/browser/indexed_db/indexed_db_factory_unittest.cc

Issue 2500263003: Port messages sent by WebIDBCursorImpl to Mojo. (Closed)
Patch Set: Address dcheng@'s comments. Created 4 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 *s = leveldb::Status::IOError("Disk is full"); 220 *s = leveldb::Status::IOError("Disk is full");
221 return scoped_refptr<IndexedDBBackingStore>(); 221 return scoped_refptr<IndexedDBBackingStore>();
222 } 222 }
223 223
224 DISALLOW_COPY_AND_ASSIGN(DiskFullFactory); 224 DISALLOW_COPY_AND_ASSIGN(DiskFullFactory);
225 }; 225 };
226 226
227 class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks { 227 class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks {
228 public: 228 public:
229 LookingForQuotaErrorMockCallbacks() 229 LookingForQuotaErrorMockCallbacks()
230 : IndexedDBCallbacks(nullptr, 0, 0), error_called_(false) {} 230 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr),
231 error_called_(false) {}
231 void OnError(const IndexedDBDatabaseError& error) override { 232 void OnError(const IndexedDBDatabaseError& error) override {
232 error_called_ = true; 233 error_called_ = true;
233 EXPECT_EQ(blink::WebIDBDatabaseExceptionQuotaError, error.code()); 234 EXPECT_EQ(blink::WebIDBDatabaseExceptionQuotaError, error.code());
234 } 235 }
235 bool error_called() const { return error_called_; } 236 bool error_called() const { return error_called_; }
236 237
237 private: 238 private:
238 ~LookingForQuotaErrorMockCallbacks() override {} 239 ~LookingForQuotaErrorMockCallbacks() override {}
239 bool error_called_; 240 bool error_called_;
240 241
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 temp_directory.GetPath()); 502 temp_directory.GetPath());
502 EXPECT_TRUE(callbacks->saw_error()); 503 EXPECT_TRUE(callbacks->saw_error());
503 EXPECT_FALSE(factory()->IsDatabaseOpen(origin, db_name)); 504 EXPECT_FALSE(factory()->IsDatabaseOpen(origin, db_name));
504 } 505 }
505 506
506 // Terminate all pending-close timers. 507 // Terminate all pending-close timers.
507 factory()->ForceClose(origin); 508 factory()->ForceClose(origin);
508 } 509 }
509 510
510 } // namespace content 511 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698