Index: chrome/browser/extensions/web_view_interactive_browsertest.cc |
diff --git a/chrome/browser/extensions/web_view_interactive_browsertest.cc b/chrome/browser/extensions/web_view_interactive_browsertest.cc |
index bcece75dbe43132aec5ab21b48ba95e92604cf7b..eb696e6e4d4f0f270150469a03fade516bf7c83c 100644 |
--- a/chrome/browser/extensions/web_view_interactive_browsertest.cc |
+++ b/chrome/browser/extensions/web_view_interactive_browsertest.cc |
@@ -18,6 +18,7 @@ |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_view.h" |
#include "content/public/test/browser_test_utils.h" |
+#include "net/test/embedded_test_server/embedded_test_server.h" |
#include "ui/base/keycodes/keyboard_codes.h" |
#include "ui/base/test/ui_controls.h" |
@@ -101,7 +102,7 @@ class WebViewInteractiveTest |
void NewWindowTestHelper(const std::string& test_name, |
const std::string& app_location) { |
- ASSERT_TRUE(StartTestServer()); // For serving guest pages. |
+ ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages. |
ExtensionTestMessageListener launched_listener("Launched", false); |
LoadAndLaunchPlatformApp(app_location.c_str()); |
ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
@@ -122,12 +123,12 @@ class WebViewInteractiveTest |
void SetupTest(const std::string& app_name, |
const std::string& guest_url_spec) { |
- ASSERT_TRUE(StartTestServer()); |
+ ASSERT_TRUE(StartEmbeddedTestServer()); |
GURL::Replacements replace_host; |
std::string host_str("localhost"); // Must stay in scope with replace_host. |
replace_host.SetHostStr(host_str); |
- GURL guest_url = test_server()->GetURL(guest_url_spec); |
+ GURL guest_url = embedded_test_server()->GetURL(guest_url_spec); |
guest_url = guest_url.ReplaceComponents(replace_host); |
ui_test_utils::UrlLoadObserver guest_observer( |
@@ -290,7 +291,7 @@ class WebViewInteractiveTest |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, PointerLock) { |
SetupTest("web_view/pointer_lock", |
- "files/extensions/platform_apps/web_view/pointer_lock/guest.html"); |
+ "/extensions/platform_apps/web_view/pointer_lock/guest.html"); |
// Move the mouse over the Lock Pointer button. |
ASSERT_TRUE(ui_test_utils::SendMouseMoveSync( |
@@ -364,7 +365,7 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, PointerLock) { |
// Tests that setting focus on the <webview> sets focus on the guest. |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DISABLED_Focus) { |
- ASSERT_TRUE(StartTestServer()); // For serving guest pages. |
+ ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages. |
ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/focus")) |
<< message_; |
} |
@@ -372,7 +373,7 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DISABLED_Focus) { |
// Tests that guests receive edit commands and respond appropriately. |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, EditCommands) { |
SetupTest("web_view/edit_commands", |
- "files/extensions/platform_apps/web_view/edit_commands/guest.html"); |
+ "/extensions/platform_apps/web_view/edit_commands/guest.html"); |
ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow( |
GetPlatformAppWindow())); |
@@ -390,7 +391,7 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, EditCommands) { |
// Tests that guests receive edit commands and respond appropriately. |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, EditCommandsNoMenu) { |
SetupTest("web_view/edit_commands_no_menu", |
- "files/extensions/platform_apps/web_view/edit_commands_no_menu/" |
+ "/extensions/platform_apps/web_view/edit_commands_no_menu/" |
"guest.html"); |
ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow( |
@@ -436,7 +437,7 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, NewWindow_WebRequest) { |
} |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, ExecuteCode) { |
- ASSERT_TRUE(StartTestServer()); // For serving guest pages. |
+ ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages. |
ASSERT_TRUE(RunPlatformAppTestWithArg( |
"platform_apps/web_view/common", "execute_code")) << message_; |
} |
@@ -444,7 +445,7 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, ExecuteCode) { |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, PopupPositioning) { |
SetupTest( |
"web_view/popup_positioning", |
- "files/extensions/platform_apps/web_view/popup_positioning/guest.html"); |
+ "/extensions/platform_apps/web_view/popup_positioning/guest.html"); |
ASSERT_TRUE(guest_web_contents()); |
PopupTestHelper(gfx::Point()); |
@@ -461,7 +462,7 @@ IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, PopupPositioning) { |
IN_PROC_BROWSER_TEST_F(WebViewInteractiveTest, DISABLED_PopupPositioningMoved) { |
SetupTest( |
"web_view/popup_positioning_moved", |
- "files/extensions/platform_apps/web_view/popup_positioning_moved" |
+ "/extensions/platform_apps/web_view/popup_positioning_moved" |
"/guest.html"); |
ASSERT_TRUE(guest_web_contents()); |