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

Side by Side Diff: content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc

Issue 658223002: replace newly added OVERRIDE with override in service worker unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/scoped_temp_dir.h" 5 #include "base/files/scoped_temp_dir.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/browser_thread_impl.h" 8 #include "content/browser/browser_thread_impl.h"
9 #include "content/browser/fileapi/mock_url_request_delegate.h" 9 #include "content/browser/fileapi/mock_url_request_delegate.h"
10 #include "content/browser/service_worker/embedded_worker_test_helper.h" 10 #include "content/browser/service_worker/embedded_worker_test_helper.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 MockResourceContext mock_resource_context_; 83 MockResourceContext mock_resource_context_;
84 GURL scope_; 84 GURL scope_;
85 GURL script_url_; 85 GURL script_url_;
86 }; 86 };
87 87
88 class ServiceWorkerTestContentBrowserClient : public TestContentBrowserClient { 88 class ServiceWorkerTestContentBrowserClient : public TestContentBrowserClient {
89 public: 89 public:
90 ServiceWorkerTestContentBrowserClient() {} 90 ServiceWorkerTestContentBrowserClient() {}
91 virtual bool AllowServiceWorker(const GURL& scope, 91 virtual bool AllowServiceWorker(const GURL& scope,
92 const GURL& first_party, 92 const GURL& first_party,
93 content::ResourceContext* context) OVERRIDE { 93 content::ResourceContext* context) override {
94 return false; 94 return false;
95 } 95 }
96 }; 96 };
97 97
98 TEST_F(ServiceWorkerControlleeRequestHandlerTest, DisallowServiceWorker) { 98 TEST_F(ServiceWorkerControlleeRequestHandlerTest, DisallowServiceWorker) {
99 ServiceWorkerTestContentBrowserClient test_browser_client; 99 ServiceWorkerTestContentBrowserClient test_browser_client;
100 ContentBrowserClient* old_browser_client = 100 ContentBrowserClient* old_browser_client =
101 SetBrowserClientForTesting(&test_browser_client); 101 SetBrowserClientForTesting(&test_browser_client);
102 102
103 // Store an activated worker. 103 // Store an activated worker.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // Shouldn't crash if the ProviderHost is deleted prior to completion of 235 // Shouldn't crash if the ProviderHost is deleted prior to completion of
236 // the database lookup. 236 // the database lookup.
237 context()->RemoveProviderHost(kMockRenderProcessId, kMockProviderId); 237 context()->RemoveProviderHost(kMockRenderProcessId, kMockProviderId);
238 EXPECT_FALSE(provider_host_.get()); 238 EXPECT_FALSE(provider_host_.get());
239 base::RunLoop().RunUntilIdle(); 239 base::RunLoop().RunUntilIdle();
240 EXPECT_TRUE(sw_job->ShouldFallbackToNetwork()); 240 EXPECT_TRUE(sw_job->ShouldFallbackToNetwork());
241 EXPECT_FALSE(sw_job->ShouldForwardToServiceWorker()); 241 EXPECT_FALSE(sw_job->ShouldForwardToServiceWorker());
242 } 242 }
243 243
244 } // namespace content 244 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698