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

Side by Side Diff: chrome/browser/chrome_switches_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/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/browser/ui/browser_tabstrip.h" 7 #include "chrome/browser/ui/browser_tabstrip.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 21 matching lines...) Expand all
32 DISALLOW_COPY_AND_ASSIGN(HostRulesTest); 32 DISALLOW_COPY_AND_ASSIGN(HostRulesTest);
33 }; 33 };
34 34
35 IN_PROC_BROWSER_TEST_F(HostRulesTest, TestMap) { 35 IN_PROC_BROWSER_TEST_F(HostRulesTest, TestMap) {
36 // Go to the empty page using www.google.com as the host. 36 // Go to the empty page using www.google.com as the host.
37 GURL local_url = test_server()->GetURL("files/empty.html"); 37 GURL local_url = test_server()->GetURL("files/empty.html");
38 GURL test_url(std::string("http://www.google.com") + local_url.path()); 38 GURL test_url(std::string("http://www.google.com") + local_url.path());
39 ui_test_utils::NavigateToURL(browser(), test_url); 39 ui_test_utils::NavigateToURL(browser(), test_url);
40 40
41 std::string html; 41 std::string html;
42 EXPECT_TRUE(content::ExecuteJavaScriptAndExtractString( 42 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
43 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), 43 chrome::GetActiveWebContents(browser()),
44 "",
45 "window.domAutomationController.send(document.body.outerHTML);", 44 "window.domAutomationController.send(document.body.outerHTML);",
46 &html)); 45 &html));
47 46
48 EXPECT_STREQ("<body></body>", html.c_str()); 47 EXPECT_STREQ("<body></body>", html.c_str());
49 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698