| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 } | 239 } |
| 240 | 240 |
| 241 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, TransactionTest) { | 241 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, TransactionTest) { |
| 242 SimpleTest(GetTestUrl("indexeddb", "transaction_test.html")); | 242 SimpleTest(GetTestUrl("indexeddb", "transaction_test.html")); |
| 243 } | 243 } |
| 244 | 244 |
| 245 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CallbackAccounting) { | 245 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CallbackAccounting) { |
| 246 SimpleTest(GetTestUrl("indexeddb", "callback_accounting.html")); | 246 SimpleTest(GetTestUrl("indexeddb", "callback_accounting.html")); |
| 247 } | 247 } |
| 248 | 248 |
| 249 | 249 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, GetAllMaxMessageSize) { |
| 250 // https://crbug.com/616155 | |
| 251 #if defined(ANDROID) | |
| 252 #define MAYBE_GetAllMaxMessageSize DISABLED_GetAllMaxMessageSize | |
| 253 #else | |
| 254 #define MAYBE_GetAllMaxMessageSize GetAllMaxMessageSize | |
| 255 #endif | |
| 256 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, MAYBE_GetAllMaxMessageSize) { | |
| 257 SimpleTest(GetTestUrl("indexeddb", "getall_max_message_size.html")); | 250 SimpleTest(GetTestUrl("indexeddb", "getall_max_message_size.html")); |
| 258 } | 251 } |
| 259 | 252 |
| 260 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DoesntHangTest) { | 253 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DoesntHangTest) { |
| 261 SimpleTest(GetTestUrl("indexeddb", "transaction_run_forever.html")); | 254 SimpleTest(GetTestUrl("indexeddb", "transaction_run_forever.html")); |
| 262 CrashTab(shell()->web_contents()); | 255 CrashTab(shell()->web_contents()); |
| 263 SimpleTest(GetTestUrl("indexeddb", "transaction_not_blocked.html")); | 256 SimpleTest(GetTestUrl("indexeddb", "transaction_not_blocked.html")); |
| 264 } | 257 } |
| 265 | 258 |
| 266 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, Bug84933Test) { | 259 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, Bug84933Test) { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 SimpleTest(GetTestUrl("indexeddb", "database_test.html")); | 423 SimpleTest(GetTestUrl("indexeddb", "database_test.html")); |
| 431 base::FilePath leveldb_dir(FILE_PATH_LITERAL("file__0.indexeddb.leveldb")); | 424 base::FilePath leveldb_dir(FILE_PATH_LITERAL("file__0.indexeddb.leveldb")); |
| 432 base::FilePath log_file(FILE_PATH_LITERAL("LOG")); | 425 base::FilePath log_file(FILE_PATH_LITERAL("LOG")); |
| 433 base::FilePath log_file_path = | 426 base::FilePath log_file_path = |
| 434 GetContext()->data_path().Append(leveldb_dir).Append(log_file); | 427 GetContext()->data_path().Append(leveldb_dir).Append(log_file); |
| 435 int64_t size; | 428 int64_t size; |
| 436 EXPECT_TRUE(base::GetFileSize(log_file_path, &size)); | 429 EXPECT_TRUE(base::GetFileSize(log_file_path, &size)); |
| 437 EXPECT_GT(size, 0); | 430 EXPECT_GT(size, 0); |
| 438 } | 431 } |
| 439 | 432 |
| 440 // Disabled due to flakes on Android bots. See crbug.com/616100. | 433 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CanDeleteWhenOverQuotaTest) { |
| 441 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, | |
| 442 DISABLED_CanDeleteWhenOverQuotaTest) { | |
| 443 SimpleTest(GetTestUrl("indexeddb", "fill_up_5k.html")); | 434 SimpleTest(GetTestUrl("indexeddb", "fill_up_5k.html")); |
| 444 int64_t size = RequestDiskUsage(); | 435 int64_t size = RequestDiskUsage(); |
| 445 const int kQuotaKilobytes = 2; | 436 const int kQuotaKilobytes = 2; |
| 446 EXPECT_GT(size, kQuotaKilobytes * 1024); | 437 EXPECT_GT(size, kQuotaKilobytes * 1024); |
| 447 SetQuota(kQuotaKilobytes); | 438 SetQuota(kQuotaKilobytes); |
| 448 SimpleTest(GetTestUrl("indexeddb", "delete_over_quota.html")); | 439 SimpleTest(GetTestUrl("indexeddb", "delete_over_quota.html")); |
| 449 } | 440 } |
| 450 | 441 |
| 451 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, EmptyBlob) { | 442 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, EmptyBlob) { |
| 452 // First delete all IDB's for the test origin | 443 // First delete all IDB's for the test origin |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 724 |
| 734 INSTANTIATE_TEST_CASE_P(IndexedDBBrowserTestInstantiation, | 725 INSTANTIATE_TEST_CASE_P(IndexedDBBrowserTestInstantiation, |
| 735 IndexedDBBrowserTest, | 726 IndexedDBBrowserTest, |
| 736 ::testing::Values("failGetBlobJournal", | 727 ::testing::Values("failGetBlobJournal", |
| 737 "get", | 728 "get", |
| 738 "getAll", | 729 "getAll", |
| 739 "failWebkitGetDatabaseNames", | 730 "failWebkitGetDatabaseNames", |
| 740 "iterate", | 731 "iterate", |
| 741 "failTransactionCommit", | 732 "failTransactionCommit", |
| 742 "clearObjectStore")); | 733 "clearObjectStore")); |
| 743 // https://crbug.com/616155 | 734 |
| 744 #if defined(ANDROID) | 735 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteCompactsBackingStore) { |
| 745 #define MAYBE_DeleteCompactsBackingStore DISABLED_DeleteCompactsBackingStore | |
| 746 #else | |
| 747 #define MAYBE_DeleteCompactsBackingStore DeleteCompactsBackingStore | |
| 748 #endif | |
| 749 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, | |
| 750 MAYBE_DeleteCompactsBackingStore) { | |
| 751 const GURL test_url = GetTestUrl("indexeddb", "delete_compact.html"); | 736 const GURL test_url = GetTestUrl("indexeddb", "delete_compact.html"); |
| 752 SimpleTest(GURL(test_url.spec() + "#fill")); | 737 SimpleTest(GURL(test_url.spec() + "#fill")); |
| 753 int64_t after_filling = RequestDiskUsage(); | 738 int64_t after_filling = RequestDiskUsage(); |
| 754 EXPECT_GT(after_filling, 0); | 739 EXPECT_GT(after_filling, 0); |
| 755 | 740 |
| 756 SimpleTest(GURL(test_url.spec() + "#purge")); | 741 SimpleTest(GURL(test_url.spec() + "#purge")); |
| 757 int64_t after_deleting = RequestDiskUsage(); | 742 int64_t after_deleting = RequestDiskUsage(); |
| 758 EXPECT_LT(after_deleting, after_filling); | 743 EXPECT_LT(after_deleting, after_filling); |
| 759 | 744 |
| 760 // The above tests verify basic assertions - that filling writes data and | 745 // The above tests verify basic assertions - that filling writes data and |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 command_line->AppendSwitch(switches::kSingleProcess); | 854 command_line->AppendSwitch(switches::kSingleProcess); |
| 870 } | 855 } |
| 871 }; | 856 }; |
| 872 | 857 |
| 873 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, | 858 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, |
| 874 RenderThreadShutdownTest) { | 859 RenderThreadShutdownTest) { |
| 875 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); | 860 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); |
| 876 } | 861 } |
| 877 | 862 |
| 878 } // namespace content | 863 } // namespace content |
| OLD | NEW |