Skip to content

Commit

Permalink
S13nServiceWorker: Skip InitializeHandler tests
Browse files Browse the repository at this point in the history
As a comment in ServiceWorkerRequestHandler::InitializeHandler()
says[1], we may call it but do nothing when S13nServiceWorker
is enabled. Skip tests for InitializeHandler() when S13nServiceWorker
is enabled.

[1] https://cs.chromium.org/chromium/src/content/browser/service_worker/service_worker_request_handler.cc?l=232&rcl=e09f67110c9a517c981814b643b69c8de0833aac

Bug: 860361
Change-Id: I55afa47c165c33d82b38e9e2b89b153ff8aaffb2
Reviewed-on: https://chromium-review.googlesource.com/1144580
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576753}
  • Loading branch information
bashi authored and Commit Bot committed Jul 20, 2018
1 parent 26c6253 commit 271eaf5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "services/network/public/mojom/request_context_frame_type.mojom.h"
#include "storage/browser/blob/blob_storage_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/service_worker/service_worker_utils.h"

namespace content {
namespace service_worker_request_handler_unittest {
Expand Down Expand Up @@ -119,6 +120,11 @@ class ServiceWorkerRequestHandlerTest : public testing::Test {
const std::string& method,
bool skip_service_worker,
ResourceType resource_type) {
// Skip handler initialization tests when S13nServiceWorker is enabled
// because we don't use this path. See also comments in
// ServiceWorkerRequestHandler::InitializeHandler().
if (blink::ServiceWorkerUtils::IsServicificationEnabled())
return;
InitializeProviderHostForWindow();
std::unique_ptr<net::URLRequest> request = CreateRequest(url, method);
InitializeHandler(request.get(), skip_service_worker, resource_type);
Expand Down

0 comments on commit 271eaf5

Please sign in to comment.