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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 using storage::DatabaseUtil; | 42 using storage::DatabaseUtil; |
43 | 43 |
44 namespace content { | 44 namespace content { |
45 | 45 |
46 // This browser test is aimed towards exercising the IndexedDB bindings and | 46 // This browser test is aimed towards exercising the IndexedDB bindings and |
47 // the actual implementation that lives in the browser side. | 47 // the actual implementation that lives in the browser side. |
48 class IndexedDBBrowserTest : public ContentBrowserTest { | 48 class IndexedDBBrowserTest : public ContentBrowserTest { |
49 public: | 49 public: |
50 IndexedDBBrowserTest() : disk_usage_(-1) {} | 50 IndexedDBBrowserTest() : disk_usage_(-1) {} |
51 | 51 |
52 virtual void SetUp() override { | 52 void SetUp() override { |
53 GetTestClassFactory()->Reset(); | 53 GetTestClassFactory()->Reset(); |
54 IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(GetIDBClassFactory); | 54 IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(GetIDBClassFactory); |
55 ContentBrowserTest::SetUp(); | 55 ContentBrowserTest::SetUp(); |
56 } | 56 } |
57 | 57 |
58 virtual void TearDown() override { | 58 void TearDown() override { |
59 IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(NULL); | 59 IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(NULL); |
60 ContentBrowserTest::TearDown(); | 60 ContentBrowserTest::TearDown(); |
61 } | 61 } |
62 | 62 |
63 void FailOperation(FailClass failure_class, | 63 void FailOperation(FailClass failure_class, |
64 FailMethod failure_method, | 64 FailMethod failure_method, |
65 int fail_on_instance_num, | 65 int fail_on_instance_num, |
66 int fail_on_call_num) { | 66 int fail_on_call_num) { |
67 GetTestClassFactory()->FailOperation( | 67 GetTestClassFactory()->FailOperation( |
68 failure_class, failure_method, fail_on_instance_num, fail_on_call_num); | 68 failure_class, failure_method, fail_on_instance_num, fail_on_call_num); |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 command_line->AppendSwitch(switches::kSingleProcess); | 717 command_line->AppendSwitch(switches::kSingleProcess); |
718 } | 718 } |
719 }; | 719 }; |
720 | 720 |
721 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, | 721 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, |
722 RenderThreadShutdownTest) { | 722 RenderThreadShutdownTest) { |
723 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); | 723 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); |
724 } | 724 } |
725 | 725 |
726 } // namespace content | 726 } // namespace content |
OLD | NEW |