Index: chrome/browser/extensions/app_background_page_apitest.cc |
diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc |
index 773c52846dfe26712e7452247b9b2b7e76119be8..a29459dd5cb9cccdfb804a68e4b2952ab22cae46 100644 |
--- a/chrome/browser/extensions/app_background_page_apitest.cc |
+++ b/chrome/browser/extensions/app_background_page_apitest.cc |
@@ -20,6 +20,7 @@ |
#include "content/public/test/test_notification_tracker.h" |
#include "content/public/test/test_utils.h" |
#include "net/dns/mock_host_resolver.h" |
+#include "net/test/embedded_test_server/embedded_test_server.h" |
#if defined(OS_MACOSX) |
#include "base/mac/scoped_nsautorelease_pool.h" |
@@ -131,7 +132,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, MAYBE_Basic) { |
" }," |
" \"permissions\": [\"background\"]" |
"}", |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -163,7 +164,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, DISABLED_LacksPermission) { |
" }" |
" }" |
"}", |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -195,8 +196,8 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, ManifestBackgroundPage) { |
" \"page\": \"http://a.com:%d/test.html\"" |
" }" |
"}", |
- test_server()->host_port_pair().port(), |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port(), |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -243,7 +244,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, NoJsBackgroundPage) { |
" \"allow_js_access\": false" |
" }" |
"}", |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -288,8 +289,8 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, NoJsManifestBackgroundPage) { |
" \"allow_js_access\": false" |
" }" |
"}", |
- test_server()->host_port_pair().port(), |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port(), |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -324,7 +325,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, OpenTwoBackgroundPages) { |
" }," |
" \"permissions\": [\"background\"]" |
"}", |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -356,8 +357,8 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, OpenTwoPagesWithManifest) { |
" }," |
" \"permissions\": [\"background\"]" |
"}", |
- test_server()->host_port_pair().port(), |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port(), |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -386,12 +387,12 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, DISABLED_OpenPopupFromBGPage) { |
" \"web_url\": \"http://a.com:%d/\"" |
" }" |
" }," |
- " \"background\": { \"page\": \"http://a.com:%d/files/extensions/api_test/" |
+ " \"background\": { \"page\": \"http://a.com:%d/extensions/api_test/" |
"app_background_page/bg_open/bg_open_bg.html\" }," |
" \"permissions\": [\"background\"]" |
"}", |
- test_server()->host_port_pair().port(), |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port(), |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -418,7 +419,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, DISABLED_OpenThenClose) { |
" }," |
" \"permissions\": [\"background\"]" |
"}", |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |
@@ -467,8 +468,8 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, UnloadExtensionWhileHidden) { |
" \"page\": \"http://a.com:%d/test.html\"" |
" }" |
"}", |
- test_server()->host_port_pair().port(), |
- test_server()->host_port_pair().port()); |
+ embedded_test_server()->port(), |
+ embedded_test_server()->port()); |
base::FilePath app_dir; |
ASSERT_TRUE(CreateApp(app_manifest, &app_dir)); |