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

Unified Diff: chrome/browser/browser_keyevents_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: rebase 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/wallpaper_private_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/wallpaper_private_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698