Index: chrome/browser/browser_keyevents_browsertest.cc |
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc |
index 781d009be191658515bf97d8fb57d3f2e1d37070..f27f00f46c3cf42c37abcc082308cc058553d031 100644 |
--- a/chrome/browser/browser_keyevents_browsertest.cc |
+++ b/chrome/browser/browser_keyevents_browsertest.cc |
@@ -25,7 +25,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/spawned_test_server/spawned_test_server.h" |
+#include "net/test/embedded_test_server/embedded_test_server.h" |
#include "ui/base/keycodes/keyboard_codes.h" |
#include "ui/views/controls/textfield/textfield.h" |
@@ -40,7 +40,7 @@ using content::RenderViewHost; |
namespace { |
-const char kTestingPage[] = "files/keyevents_test.html"; |
+const char kTestingPage[] = "/keyevents_test.html"; |
const char kSuppressEventJS[] = |
"window.domAutomationController.send(setDefaultAction('%ls', %ls));"; |
const char kGetResultJS[] = |
@@ -368,10 +368,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_NormalKeyEvents) { |
"U 65 0 false false false false" } }, |
}; |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
@@ -461,10 +461,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_CtrlKeyEvents) { |
"U 17 0 true false false false" } |
}; |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
@@ -507,10 +507,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_CommandKeyEvents) { |
"U 91 0 false false false true" } |
}; |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
@@ -607,10 +607,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_AccessKeys) { |
#endif |
#endif |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
content::RunAllPendingInMessageLoop(); |
@@ -681,10 +681,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_AccessKeys) { |
#define MAYBE_ReservedAccelerators ReservedAccelerators |
#endif |
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) { |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
@@ -783,10 +783,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) { |
"U 17 0 true false false false" } |
}; |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
@@ -821,10 +821,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_PageUpDownKeys) { |
"U 34 0 false false false false" } |
}; |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |
@@ -863,10 +863,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, FocusMenuBarByAltKey) { |
"U 17 0 true false false false" } |
}; |
- ASSERT_TRUE(test_server()->Start()); |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
- GURL url = test_server()->GetURL(kTestingPage); |
+ GURL url = embedded_test_server()->GetURL(kTestingPage); |
ui_test_utils::NavigateToURL(browser(), url); |
ASSERT_NO_FATAL_FAILURE(ClickOnView(VIEW_ID_TAB_CONTAINER)); |