Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: content/browser/fileapi/file_system_browsertest.cc

Issue 11753009: Simplify ExecuteJavaScript* functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update prerender_browsertest.cc. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/encrypted_media_browsertest.cc ('k') | content/browser/in_process_webkit/indexed_db_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698