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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // The test page will perform tests on IndexedDB, then navigate to either 42 // The test page will perform tests on IndexedDB, then navigate to either
43 // a #pass or #fail ref. 43 // a #pass or #fail ref.
44 Shell* the_browser = incognito ? CreateOffTheRecordBrowser() : shell(); 44 Shell* the_browser = incognito ? CreateOffTheRecordBrowser() : shell();
45 45
46 LOG(INFO) << "Navigating to URL and blocking."; 46 LOG(INFO) << "Navigating to URL and blocking.";
47 NavigateToURLBlockUntilNavigationsComplete(the_browser, test_url, 2); 47 NavigateToURLBlockUntilNavigationsComplete(the_browser, test_url, 2);
48 LOG(INFO) << "Navigation done."; 48 LOG(INFO) << "Navigation done.";
49 std::string result = the_browser->web_contents()->GetURL().ref(); 49 std::string result = the_browser->web_contents()->GetURL().ref();
50 if (result != "pass") { 50 if (result != "pass") {
51 std::string js_result; 51 std::string js_result;
52 ASSERT_TRUE(ExecuteJavaScriptAndExtractString( 52 ASSERT_TRUE(ExecuteScriptAndExtractString(
53 the_browser->web_contents()->GetRenderViewHost(), 53 the_browser->web_contents(),
54 std::string(),
55 "window.domAutomationController.send(getLog())", 54 "window.domAutomationController.send(getLog())",
56 &js_result)); 55 &js_result));
57 FAIL() << "Failed: " << js_result; 56 FAIL() << "Failed: " << js_result;
58 } 57 }
59 } 58 }
60 59
61 void NavigateAndWaitForTitle(Shell* shell, 60 void NavigateAndWaitForTitle(Shell* shell,
62 const char* filename, 61 const char* filename,
63 const char* hash, 62 const char* hash,
64 const char* expected_string) { 63 const char* expected_string) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); 387 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16);
389 388
390 base::KillProcess( 389 base::KillProcess(
391 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); 390 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true);
392 shell()->Close(); 391 shell()->Close();
393 392
394 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); 393 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
395 } 394 }
396 395
397 } // namespace content 396 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/file_system_browsertest.cc ('k') | content/browser/loader/resource_dispatcher_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698