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_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/test/thread_test_helper.h" | 9 #include "base/test/thread_test_helper.h" |
10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 the_browser->web_contents(), | 44 the_browser->web_contents(), |
45 "window.domAutomationController.send(getLog())", | 45 "window.domAutomationController.send(getLog())", |
46 &js_result)); | 46 &js_result)); |
47 FAIL() << "Failed: " << js_result; | 47 FAIL() << "Failed: " << js_result; |
48 } | 48 } |
49 } | 49 } |
50 }; | 50 }; |
51 | 51 |
52 class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { | 52 class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { |
53 public: | 53 public: |
54 virtual void SetUpOnMainThread() OVERRIDE { | 54 virtual void SetUpOnMainThread() override { |
55 const int kInitialQuotaKilobytes = 5000; | 55 const int kInitialQuotaKilobytes = 5000; |
56 const int kTemporaryStorageQuotaMaxSize = | 56 const int kTemporaryStorageQuotaMaxSize = |
57 kInitialQuotaKilobytes * 1024 * QuotaManager::kPerHostTemporaryPortion; | 57 kInitialQuotaKilobytes * 1024 * QuotaManager::kPerHostTemporaryPortion; |
58 SetTempQuota( | 58 SetTempQuota( |
59 kTemporaryStorageQuotaMaxSize, | 59 kTemporaryStorageQuotaMaxSize, |
60 BrowserContext::GetDefaultStoragePartition( | 60 BrowserContext::GetDefaultStoragePartition( |
61 shell()->web_contents()->GetBrowserContext())->GetQuotaManager()); | 61 shell()->web_contents()->GetBrowserContext())->GetQuotaManager()); |
62 } | 62 } |
63 | 63 |
64 static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) { | 64 static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) { |
(...skipping 19 matching lines...) Expand all Loading... |
84 | 84 |
85 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTest, CreateTest) { | 85 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTest, CreateTest) { |
86 SimpleTest(GetTestUrl("fileapi", "create_test.html")); | 86 SimpleTest(GetTestUrl("fileapi", "create_test.html")); |
87 } | 87 } |
88 | 88 |
89 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTestWithLowQuota, QuotaTest) { | 89 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTestWithLowQuota, QuotaTest) { |
90 SimpleTest(GetTestUrl("fileapi", "quota_test.html")); | 90 SimpleTest(GetTestUrl("fileapi", "quota_test.html")); |
91 } | 91 } |
92 | 92 |
93 } // namespace content | 93 } // namespace content |
OLD | NEW |