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

Unified Diff: content/browser/background_sync/background_sync_browsertest.cc

Issue 1378123003: Adding SSL ETS Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ets
Patch Set: Rebase. Created 5 years, 2 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: content/browser/background_sync/background_sync_browsertest.cc
diff --git a/content/browser/background_sync/background_sync_browsertest.cc b/content/browser/background_sync/background_sync_browsertest.cc
index 8fc9da1e59a36c11538a76e63aea629784921f84..93cd2a287ab6249e86a9b8d43ad1379856aeca4f 100644
--- a/content/browser/background_sync/background_sync_browsertest.cc
+++ b/content/browser/background_sync/background_sync_browsertest.cc
@@ -27,6 +27,7 @@
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "net/base/network_change_notifier.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
using net::NetworkChangeNotifier;
@@ -35,7 +36,7 @@ namespace content {
namespace {
-const char kDefaultTestURL[] = "files/background_sync/test.html";
+const char kDefaultTestURL[] = "/background_sync/test.html";
const char kSuccessfulOperationPrefix[] = "ok - ";
@@ -123,11 +124,9 @@ class BackgroundSyncBrowserTest : public ContentBrowserTest {
}
void SetUpOnMainThread() override {
- https_server_.reset(new net::SpawnedTestServer(
- net::SpawnedTestServer::TYPE_HTTPS,
- net::BaseTestServer::SSLOptions(
- net::BaseTestServer::SSLOptions::CERT_OK),
- base::FilePath(FILE_PATH_LITERAL("content/test/data/"))));
+ https_server_.reset(
+ new net::EmbeddedTestServer(net::EmbeddedTestServer::TYPE_HTTPS));
+ https_server_->ServeFilesFromSourceDirectory("content/test/data");
ASSERT_TRUE(https_server_->Start());
SetIncognitoMode(false);
@@ -183,7 +182,7 @@ class BackgroundSyncBrowserTest : public ContentBrowserTest {
bool StoreRegistrationOneShot(const std::string& tag);
private:
- scoped_ptr<net::SpawnedTestServer> https_server_;
+ scoped_ptr<net::EmbeddedTestServer> https_server_;
Shell* shell_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(BackgroundSyncBrowserTest);

Powered by Google App Engine
This is Rietveld 408576698