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" |
(...skipping 27 matching lines...) Expand all Loading... |
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."; |
41 NavigateToURLBlockUntilNavigationsComplete(the_browser, test_url, 2); | 41 NavigateToURLBlockUntilNavigationsComplete(the_browser, test_url, 2); |
42 VLOG(0) << "Navigation done."; | 42 VLOG(0) << "Navigation done."; |
43 std::string result = | 43 std::string result = |
44 the_browser->web_contents()->GetLastCommittedURL().ref(); | 44 the_browser->web_contents()->GetLastCommittedURL().ref(); |
45 if (result != "pass") { | 45 if (result != "pass") { |
46 std::string js_result; | 46 std::string js_result; |
47 ASSERT_TRUE(ExecuteScriptAndExtractString( | 47 ASSERT_TRUE(ExecuteScriptAndExtractString( |
48 the_browser->web_contents(), | 48 the_browser, "window.domAutomationController.send(getLog())", |
49 "window.domAutomationController.send(getLog())", | |
50 &js_result)); | 49 &js_result)); |
51 FAIL() << "Failed: " << js_result; | 50 FAIL() << "Failed: " << js_result; |
52 } | 51 } |
53 } | 52 } |
54 }; | 53 }; |
55 | 54 |
56 class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { | 55 class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { |
57 public: | 56 public: |
58 void SetUpOnMainThread() override { | 57 void SetUpOnMainThread() override { |
59 const int kInitialQuotaKilobytes = 5000; | 58 const int kInitialQuotaKilobytes = 5000; |
(...skipping 28 matching lines...) Expand all Loading... |
88 | 87 |
89 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTest, CreateTest) { | 88 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTest, CreateTest) { |
90 SimpleTest(GetTestUrl("fileapi", "create_test.html")); | 89 SimpleTest(GetTestUrl("fileapi", "create_test.html")); |
91 } | 90 } |
92 | 91 |
93 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTestWithLowQuota, QuotaTest) { | 92 IN_PROC_BROWSER_TEST_F(FileSystemBrowserTestWithLowQuota, QuotaTest) { |
94 SimpleTest(GetTestUrl("fileapi", "quota_test.html")); | 93 SimpleTest(GetTestUrl("fileapi", "quota_test.html")); |
95 } | 94 } |
96 | 95 |
97 } // namespace content | 96 } // namespace content |
OLD | NEW |