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

Side by Side Diff: content/browser/service_worker/embedded_worker_test_helper.h

Issue 2434583002: Mojofy unittests: ServiceWorkerVersionTest (Closed)
Patch Set: Created 4 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 | content/browser/service_worker/embedded_worker_test_helper.cc » ('j') | 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void StartWorker( 87 void StartWorker(
88 const EmbeddedWorkerStartParams& params, 88 const EmbeddedWorkerStartParams& params,
89 service_manager::mojom::InterfaceProviderPtr browser_interfaces, 89 service_manager::mojom::InterfaceProviderPtr browser_interfaces,
90 service_manager::mojom::InterfaceProviderRequest renderer_request) 90 service_manager::mojom::InterfaceProviderRequest renderer_request)
91 override; 91 override;
92 void StopWorker(const StopWorkerCallback& callback) override; 92 void StopWorker(const StopWorkerCallback& callback) override;
93 93
94 base::WeakPtr<EmbeddedWorkerTestHelper> helper_; 94 base::WeakPtr<EmbeddedWorkerTestHelper> helper_;
95 mojo::Binding<mojom::EmbeddedWorkerInstanceClient> binding_; 95 mojo::Binding<mojom::EmbeddedWorkerInstanceClient> binding_;
96 96
97 service_manager::InterfaceRegistry local_interfaces_;
98 service_manager::InterfaceProvider remote_interfaces_;
99
100 base::Optional<int> embedded_worker_id_; 97 base::Optional<int> embedded_worker_id_;
101 98
102 private: 99 private:
103 DISALLOW_COPY_AND_ASSIGN(MockEmbeddedWorkerInstanceClient); 100 DISALLOW_COPY_AND_ASSIGN(MockEmbeddedWorkerInstanceClient);
104 }; 101 };
105 102
106 // If |user_data_directory| is empty, the context makes storage stuff in 103 // If |user_data_directory| is empty, the context makes storage stuff in
107 // memory. 104 // memory.
108 explicit EmbeddedWorkerTestHelper(const base::FilePath& user_data_directory); 105 explicit EmbeddedWorkerTestHelper(const base::FilePath& user_data_directory);
109 ~EmbeddedWorkerTestHelper() override; 106 ~EmbeddedWorkerTestHelper() override;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 std::unique_ptr<MockType> mock = 293 std::unique_ptr<MockType> mock =
297 base::MakeUnique<MockType>(std::forward<Args>(args)...); 294 base::MakeUnique<MockType>(std::forward<Args>(args)...);
298 MockType* mock_rawptr = mock.get(); 295 MockType* mock_rawptr = mock.get();
299 RegisterMockInstanceClient(std::move(mock)); 296 RegisterMockInstanceClient(std::move(mock));
300 return mock_rawptr; 297 return mock_rawptr;
301 } 298 }
302 299
303 } // namespace content 300 } // namespace content
304 301
305 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 302 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/embedded_worker_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698