OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file.h" | 7 #include "base/files/file.h" |
8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 EXPECT_EQ(0, RequestDiskUsage()); | 485 EXPECT_EQ(0, RequestDiskUsage()); |
486 } | 486 } |
487 | 487 |
488 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DiskFullOnCommit) { | 488 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DiskFullOnCommit) { |
489 // Ignore several preceding transactions: | 489 // Ignore several preceding transactions: |
490 // * The test calls deleteDatabase() which opens the backing store: | 490 // * The test calls deleteDatabase() which opens the backing store: |
491 // #1: IndexedDBBackingStore::OpenBackingStore | 491 // #1: IndexedDBBackingStore::OpenBackingStore |
492 // => IndexedDBBackingStore::SetUpMetadata | 492 // => IndexedDBBackingStore::SetUpMetadata |
493 // #2: IndexedDBBackingStore::OpenBackingStore | 493 // #2: IndexedDBBackingStore::OpenBackingStore |
494 // => IndexedDBBackingStore::CleanUpBlobJournal (no-op) | 494 // => IndexedDBBackingStore::CleanUpBlobJournal (no-op) |
495 // * Then deletes the database: | 495 // * Then deletes the database: |
jsbell
2015/04/22 21:30:07
This part (lines 495 through 502) no longer happen
| |
496 // #3: IndexedDBFactoryImpl::DeleteDatabase | 496 // #3: IndexedDBFactoryImpl::DeleteDatabase |
497 // => IndexedDBDatabase::Create | 497 // => IndexedDBDatabase::Create |
498 // => IndexedDBBackingStore::CreateIDBDatabaseMetaData | 498 // => IndexedDBBackingStore::CreateIDBDatabaseMetaData |
499 // #4: IndexedDBFactoryImpl::DeleteDatabase | 499 // #4: IndexedDBFactoryImpl::DeleteDatabase |
500 // => IndexedDBDatabase::DeleteDatabase | 500 // => IndexedDBDatabase::DeleteDatabase |
501 // => IndexedDBBackingStore::DeleteDatabase | 501 // => IndexedDBBackingStore::DeleteDatabase |
502 // => IndexedDBBackingStore::CleanUpBlobJournal (no-op) | 502 // => IndexedDBBackingStore::CleanUpBlobJournal (no-op) |
503 // * The test calls open(), to create a new database: | 503 // * The test calls open(), to create a new database: |
504 // #5: IndexedDBFactoryImpl::Open | 504 // #5: IndexedDBFactoryImpl::Open |
jsbell
2015/04/22 21:30:07
And renumber this to #3
| |
505 // => IndexedDBDatabase::Create | 505 // => IndexedDBDatabase::Create |
506 // => IndexedDBBackingStore::CreateIDBDatabaseMetaData | 506 // => IndexedDBBackingStore::CreateIDBDatabaseMetaData |
507 // #6: IndexedDBTransaction::Commit - initial "versionchange" transaction | 507 // #6: IndexedDBTransaction::Commit - initial "versionchange" transaction |
jsbell
2015/04/22 21:30:07
And renumber this to #4
| |
508 // * Once the connection is opened, the test runs: | 508 // * Once the connection is opened, the test runs: |
jsbell
2015/04/22 21:30:07
And this becomes #5, matching the instance_num cha
| |
509 // #7: IndexedDBTransaction::Commit - the test's "readwrite" transaction) | 509 // #7: IndexedDBTransaction::Commit - the test's "readwrite" transaction) |
510 const int instance_num = 7; | 510 const int instance_num = 5; |
511 const int call_num = 1; | 511 const int call_num = 1; |
512 FailOperation(FAIL_CLASS_LEVELDB_TRANSACTION, FAIL_METHOD_COMMIT_DISK_FULL, | 512 FailOperation(FAIL_CLASS_LEVELDB_TRANSACTION, FAIL_METHOD_COMMIT_DISK_FULL, |
513 instance_num, call_num); | 513 instance_num, call_num); |
514 SimpleTest(GetTestUrl("indexeddb", "disk_full_on_commit.html")); | 514 SimpleTest(GetTestUrl("indexeddb", "disk_full_on_commit.html")); |
515 } | 515 } |
516 | 516 |
517 namespace { | 517 namespace { |
518 | 518 |
519 static void CompactIndexedDBBackingStore( | 519 static void CompactIndexedDBBackingStore( |
520 scoped_refptr<IndexedDBContextImpl> context, | 520 scoped_refptr<IndexedDBContextImpl> context, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
839 command_line->AppendSwitch(switches::kSingleProcess); | 839 command_line->AppendSwitch(switches::kSingleProcess); |
840 } | 840 } |
841 }; | 841 }; |
842 | 842 |
843 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, | 843 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, |
844 RenderThreadShutdownTest) { | 844 RenderThreadShutdownTest) { |
845 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); | 845 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); |
846 } | 846 } |
847 | 847 |
848 } // namespace content | 848 } // namespace content |
OLD | NEW |