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

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 | « chrome/browser/extensions/api/tabs/tabs_test.cc ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
index 656b7d3c4bfd8285dd6cf8f11bfdf179c2a1b45e..28f99f305f85c558723434b15c4656994c777797 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
@@ -32,6 +32,7 @@
#include "gpu/config/gpu_feature_type.h"
#include "gpu/config/gpu_info.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/gl/gl_switches.h"
using gpu::GpuFeatureType;
@@ -101,7 +102,7 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
ExtensionApiTest::SetUpCommandLine(command_line);
command_line->AppendSwitchASCII(
switches::kAppsGalleryURL,
- "http://www.example.com/files/extensions/api_test");
+ "http://www.example.com/extensions/api_test");
}
void SetUpInProcessBrowserTestFixture() override {
@@ -110,7 +111,7 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
// Start up the test server and get us ready for calling the install
// API functions.
host_resolver()->AddRule("www.example.com", "127.0.0.1");
- ASSERT_TRUE(StartSpawnedTestServer());
+ ASSERT_TRUE(StartEmbeddedTestServer());
extensions::ExtensionInstallUI::set_disable_failure_ui_for_tests();
}
@@ -130,7 +131,7 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
// Returns a test server URL, but with host 'www.example.com' so it matches
// the web store app's extent that we set up via command line flags.
GURL DoGetTestServerURL(const std::string& path) {
- GURL url = test_server()->GetURL(path);
+ GURL url = embedded_test_server()->GetURL(path);
// Replace the host with 'www.example.com' so it matches the web store
// app's extent.
@@ -142,7 +143,7 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest {
virtual GURL GetTestServerURL(const std::string& path) {
return DoGetTestServerURL(
- std::string("files/extensions/api_test/webstore_private/") + path);
+ std::string("/extensions/api_test/webstore_private/") + path);
}
// Navigates to |page| and runs the Extension API test there. Any downloads
@@ -189,8 +190,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest,
base::string16 failure_title = base::UTF8ToUTF16("FAIL");
content::TitleWatcher watcher(GetWebContents(), expected_title);
watcher.AlsoWaitForTitle(failure_title);
- GURL url = test_server()->GetURL(
- "files/extensions/api_test/webstore_private/noframe.html");
+ GURL url = embedded_test_server()->GetURL(
+ "/extensions/api_test/webstore_private/noframe.html");
ui_test_utils::NavigateToURL(browser(), url);
base::string16 final_title = watcher.WaitAndGetTitle();
EXPECT_EQ(expected_title, final_title);
@@ -204,8 +205,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest,
base::string16 failure_title = base::UTF8ToUTF16("FAIL");
content::TitleWatcher watcher(GetWebContents(), expected_title);
watcher.AlsoWaitForTitle(failure_title);
- GURL url = test_server()->GetURL(
- "files/extensions/api_test/webstore_private/noframe2.html");
+ GURL url = embedded_test_server()->GetURL(
+ "/extensions/api_test/webstore_private/noframe2.html");
ui_test_utils::NavigateToURL(browser(), url);
base::string16 final_title = watcher.WaitAndGetTitle();
EXPECT_EQ(expected_title, final_title);
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_test.cc ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698