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

Unified Diff: chrome/browser/extensions/extension_dom_clipboard_apitest.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
Index: chrome/browser/extensions/extension_dom_clipboard_apitest.cc
diff --git a/chrome/browser/extensions/extension_dom_clipboard_apitest.cc b/chrome/browser/extensions/extension_dom_clipboard_apitest.cc
index 0d63acbe40375ecfe918d3fb35f62803a9efb9dc..0d2e6a112662c1592b1ce521e3cd2ca6dee4a61b 100644
--- a/chrome/browser/extensions/extension_dom_clipboard_apitest.cc
+++ b/chrome/browser/extensions/extension_dom_clipboard_apitest.cc
@@ -11,6 +11,7 @@
#include "content/public/test/browser_test_utils.h"
#include "googleurl/src/gurl.h"
#include "net/dns/mock_host_resolver.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
namespace {
@@ -29,7 +30,7 @@ bool ClipboardApiTest::LoadHostedApp(const std::string& app_name,
const std::string& launch_page) {
host_resolver()->AddRule("*", "127.0.0.1");
- if (!StartTestServer()) {
+ if (!StartEmbeddedTestServer()) {
message_ = "Failed to start test server.";
return false;
}
@@ -40,7 +41,8 @@ bool ClipboardApiTest::LoadHostedApp(const std::string& app_name,
return false;
}
- GURL base_url = test_server()->GetURL("files/extensions/api_test/clipboard/");
+ GURL base_url = embedded_test_server()->GetURL(
+ "/extensions/api_test/clipboard/");
GURL::Replacements replace_host;
std::string host_str("localhost"); // Must stay in scope with replace_host.
replace_host.SetHostStr(host_str);
@@ -80,12 +82,12 @@ bool ClipboardApiTest::ExecuteScriptInSelectedTab(const std::string& script,
} // namespace
IN_PROC_BROWSER_TEST_F(ClipboardApiTest, Extension) {
- ASSERT_TRUE(StartTestServer());
+ ASSERT_TRUE(StartEmbeddedTestServer());
ASSERT_TRUE(RunExtensionTest("clipboard/extension")) << message_;
}
IN_PROC_BROWSER_TEST_F(ClipboardApiTest, ExtensionNoPermission) {
- ASSERT_TRUE(StartTestServer());
+ ASSERT_TRUE(StartEmbeddedTestServer());
ASSERT_TRUE(RunExtensionTest("clipboard/extension_no_permission"))
<< message_;
}
« no previous file with comments | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/browser/extensions/extension_incognito_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698