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/file_path.h" | 7 #include "base/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 23 matching lines...) Expand all Loading... |
34 // The test page will perform tests on FileAPI, then navigate to either | 34 // The test page will perform tests on FileAPI, then navigate to either |
35 // a #pass or #fail ref. | 35 // a #pass or #fail ref. |
36 Shell* the_browser = incognito ? CreateOffTheRecordBrowser() : shell(); | 36 Shell* the_browser = incognito ? CreateOffTheRecordBrowser() : shell(); |
37 | 37 |
38 LOG(INFO) << "Navigating to URL and blocking."; | 38 LOG(INFO) << "Navigating to URL and blocking."; |
39 NavigateToURLBlockUntilNavigationsComplete(the_browser, test_url, 2); | 39 NavigateToURLBlockUntilNavigationsComplete(the_browser, test_url, 2); |
40 LOG(INFO) << "Navigation done."; | 40 LOG(INFO) << "Navigation done."; |
41 std::string result = the_browser->web_contents()->GetURL().ref(); | 41 std::string result = the_browser->web_contents()->GetURL().ref(); |
42 if (result != "pass") { | 42 if (result != "pass") { |
43 std::string js_result; | 43 std::string js_result; |
44 ASSERT_TRUE(ExecuteJavaScriptAndExtractString( | 44 ASSERT_TRUE(ExecuteScriptAndExtractString( |
45 the_browser->web_contents()->GetRenderViewHost(), | 45 the_browser->web_contents(), |
46 std::string(), | |
47 "window.domAutomationController.send(getLog())", | 46 "window.domAutomationController.send(getLog())", |
48 &js_result)); | 47 &js_result)); |
49 FAIL() << "Failed: " << js_result; | 48 FAIL() << "Failed: " << js_result; |
50 } | 49 } |
51 } | 50 } |
52 }; | 51 }; |
53 | 52 |
54 class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { | 53 class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { |
55 public: | 54 public: |
56 virtual void SetUpOnMainThread() { | 55 virtual void SetUpOnMainThread() { |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 | 352 |
354 IN_PROC_BROWSER_TEST_F(FileSystemLayoutTest, WorkersSimpleTemporarySync) { | 353 IN_PROC_BROWSER_TEST_F(FileSystemLayoutTest, WorkersSimpleTemporarySync) { |
355 RunLayoutTest("workers/simple-temporary-sync.html"); | 354 RunLayoutTest("workers/simple-temporary-sync.html"); |
356 } | 355 } |
357 | 356 |
358 IN_PROC_BROWSER_TEST_F(FileSystemLayoutTest, WorkersSyncOperations) { | 357 IN_PROC_BROWSER_TEST_F(FileSystemLayoutTest, WorkersSyncOperations) { |
359 RunLayoutTest("workers/sync-operations.html"); | 358 RunLayoutTest("workers/sync-operations.html"); |
360 } | 359 } |
361 | 360 |
362 } // namespace content | 361 } // namespace content |
OLD | NEW |