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

Side by Side Diff: chrome/browser/chrome_switches_browsertest.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 years, 1 month 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
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 "base/macros.h" 6 #include "base/macros.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 18 matching lines...) Expand all
29 command_line->AppendSwitch(switches::kNoProxyServer); 29 command_line->AppendSwitch(switches::kNoProxyServer);
30 } 30 }
31 31
32 private: 32 private:
33 DISALLOW_COPY_AND_ASSIGN(HostRulesTest); 33 DISALLOW_COPY_AND_ASSIGN(HostRulesTest);
34 }; 34 };
35 35
36 IN_PROC_BROWSER_TEST_F(HostRulesTest, TestMap) { 36 IN_PROC_BROWSER_TEST_F(HostRulesTest, TestMap) {
37 // Go to the empty page using www.google.com as the host. 37 // Go to the empty page using www.google.com as the host.
38 GURL local_url = embedded_test_server()->GetURL("/empty.html"); 38 GURL local_url = embedded_test_server()->GetURL("/empty.html");
39 GURL test_url(std::string("http://www.google.com") + local_url.path()); 39 GURL test_url(std::string("http://www.google.com") +
40 local_url.path().as_string());
40 ui_test_utils::NavigateToURL(browser(), test_url); 41 ui_test_utils::NavigateToURL(browser(), test_url);
41 42
42 std::string html; 43 std::string html;
43 EXPECT_TRUE(content::ExecuteScriptAndExtractString( 44 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
44 browser()->tab_strip_model()->GetActiveWebContents(), 45 browser()->tab_strip_model()->GetActiveWebContents(),
45 "window.domAutomationController.send(document.body.outerHTML);", 46 "window.domAutomationController.send(document.body.outerHTML);",
46 &html)); 47 &html));
47 48
48 EXPECT_STREQ("<body></body>", html.c_str()); 49 EXPECT_STREQ("<body></body>", html.c_str());
49 } 50 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/app_mode/fake_cws.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698