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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/test/thread_test_helper.h" | 13 #include "base/test/thread_test_helper.h" |
14 #include "content/browser/web_contents/web_contents_impl.h" | 14 #include "content/browser/web_contents/web_contents_impl.h" |
15 #include "content/public/browser/browser_context.h" | 15 #include "content/public/browser/browser_context.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/storage_partition.h" | 17 #include "content/public/browser/storage_partition.h" |
18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
19 #include "content/public/test/browser_test_utils.h" | 19 #include "content/public/test/browser_test_utils.h" |
20 #include "content/public/test/content_browser_test.h" | 20 #include "content/public/test/content_browser_test.h" |
21 #include "content/public/test/content_browser_test_utils.h" | 21 #include "content/public/test/content_browser_test_utils.h" |
22 #include "content/shell/browser/shell.h" | 22 #include "content/shell/browser/shell.h" |
23 #include "storage/browser/quota/quota_manager.h" | 23 #include "storage/browser/quota/quota_manager.h" |
24 | 24 |
25 using storage::QuotaManager; | 25 using storage::QuotaManager; |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 // This browser test is aimed towards exercising the FileAPI bindings and | 29 // This browser test is aimed towards exercising the File System API bindings |
30 // the actual implementation that lives in the browser side. | 30 // and the actual implementation that lives in the browser side. |
31 class FileSystemBrowserTest : public ContentBrowserTest { | 31 class FileSystemBrowserTest : public ContentBrowserTest { |
32 public: | 32 public: |
33 FileSystemBrowserTest() {} | 33 FileSystemBrowserTest() {} |
34 | 34 |
35 void SimpleTest(const GURL& test_url, bool incognito = false) { | 35 void SimpleTest(const GURL& test_url, bool incognito = false) { |
36 // The test page will perform tests on FileAPI, then navigate to either | 36 // The test page will perform tests on FileAPI, then navigate to either |
37 // a #pass or #fail ref. | 37 // a #pass or #fail ref. |
38 Shell* the_browser = incognito ? CreateOffTheRecordBrowser() : shell(); | 38 Shell* the_browser = incognito ? CreateOffTheRecordBrowser() : shell(); |
39 | 39 |
40 VLOG(0) << "Navigating to URL and blocking."; | 40 VLOG(0) << "Navigating to URL and blocking."; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTest, CreateTest) { | 88 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTest, CreateTest) { |
89 SimpleTest(GetTestUrl("fileapi", "create_test.html")); | 89 SimpleTest(GetTestUrl("fileapi", "create_test.html")); |
90 } | 90 } |
91 | 91 |
92 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTestWithLowQuota, QuotaTest) { | 92 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTestWithLowQuota, QuotaTest) { |
93 SimpleTest(GetTestUrl("fileapi", "quota_test.html")); | 93 SimpleTest(GetTestUrl("fileapi", "quota_test.html")); |
94 } | 94 } |
95 | 95 |
96 } // namespace content | 96 } // namespace content |
OLD | NEW |