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

Unified Diff: chrome/browser/extensions/activity_log/activity_log_browsertest.cc

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready? Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/activity_log/activity_log_browsertest.cc
diff --git a/chrome/browser/extensions/activity_log/activity_log_browsertest.cc b/chrome/browser/extensions/activity_log/activity_log_browsertest.cc
index 2080b6eb3aa1ca5591f915ae10ae612f45de7789..0884754dd8488102392900564814623e62bbc038 100644
--- a/chrome/browser/extensions/activity_log/activity_log_browsertest.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_browsertest.cc
@@ -15,6 +15,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/test/browser_test_utils.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
namespace extensions {
@@ -84,9 +85,9 @@ IN_PROC_BROWSER_TEST_F(ActivityLogExtensionTest, MAYBE_ChromeEndToEnd) {
TabStripModel* tab_strip = StartTestServerAndInitialize();
ResultCatcher catcher;
// Set the default URL so that is has the correct port number.
- net::HostPortPair host_port = test_server()->host_port_pair();
std::string url_setting_script = base::StringPrintf(
- "defaultUrl = \'http://www.google.com:%d\';", host_port.port());
+ "defaultUrl = \'http://www.google.com:%d\';",
+ embedded_test_server()->port());
ASSERT_TRUE(content::ExecuteScript(tab_strip->GetActiveWebContents(),
url_setting_script));
// Set the test buttons array
@@ -111,9 +112,9 @@ IN_PROC_BROWSER_TEST_F(ActivityLogExtensionTest, MAYBE_DOMEndToEnd) {
TabStripModel* tab_strip = StartTestServerAndInitialize();
ResultCatcher catcher;
// Set the default URL so that is has the correct port number.
- net::HostPortPair host_port = test_server()->host_port_pair();
std::string url_setting_script = base::StringPrintf(
- "defaultUrl = \'http://www.google.com:%d\';", host_port.port());
+ "defaultUrl = \'http://www.google.com:%d\';",
+ embedded_test_server()->port());
ASSERT_TRUE(content::ExecuteScript(tab_strip->GetActiveWebContents(),
url_setting_script));
// Set the test buttons array
@@ -130,7 +131,7 @@ IN_PROC_BROWSER_TEST_F(ActivityLogExtensionTest, MAYBE_DOMEndToEnd) {
IN_PROC_BROWSER_TEST_F(ActivityLogExtensionTest, ExtensionPrerender) {
host_resolver()->AddRule("*", "127.0.0.1");
StartTestServer();
- int port = test_server()->host_port_pair().port();
+ int port = embedded_test_server()->port();
// Get the extension (chrome/test/data/extensions/activity_log)
const Extension* ext =

Powered by Google App Engine
This is Rietveld 408576698