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

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

Issue 508433002: Remove implicit conversions from scoped_refptr to T* in content/browser/service_worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "content/browser/service_worker/embedded_worker_registry.h" 7 #include "content/browser/service_worker/embedded_worker_registry.h"
8 #include "content/browser/service_worker/embedded_worker_test_helper.h" 8 #include "content/browser/service_worker/embedded_worker_test_helper.h"
9 #include "content/browser/service_worker/service_worker_context_core.h" 9 #include "content/browser/service_worker/service_worker_context_core.h"
10 #include "content/browser/service_worker/service_worker_registration.h" 10 #include "content/browser/service_worker/service_worker_registration.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 virtual void SetUp() OVERRIDE { 119 virtual void SetUp() OVERRIDE {
120 helper_.reset(new MessageReceiver()); 120 helper_.reset(new MessageReceiver());
121 121
122 registration_ = new ServiceWorkerRegistration( 122 registration_ = new ServiceWorkerRegistration(
123 GURL("http://www.example.com/"), 123 GURL("http://www.example.com/"),
124 GURL("http://www.example.com/service_worker.js"), 124 GURL("http://www.example.com/service_worker.js"),
125 1L, 125 1L,
126 helper_->context()->AsWeakPtr()); 126 helper_->context()->AsWeakPtr());
127 version_ = new ServiceWorkerVersion( 127 version_ = new ServiceWorkerVersion(
128 registration_, 1L, helper_->context()->AsWeakPtr()); 128 registration_.get(), 1L, helper_->context()->AsWeakPtr());
129 129
130 // Simulate adding one process to the worker. 130 // Simulate adding one process to the worker.
131 int embedded_worker_id = version_->embedded_worker()->embedded_worker_id(); 131 int embedded_worker_id = version_->embedded_worker()->embedded_worker_id();
132 helper_->SimulateAddProcessToWorker(embedded_worker_id, kRenderProcessId); 132 helper_->SimulateAddProcessToWorker(embedded_worker_id, kRenderProcessId);
133 ASSERT_TRUE(version_->HasProcessToRun()); 133 ASSERT_TRUE(version_->HasProcessToRun());
134 } 134 }
135 135
136 virtual void TearDown() OVERRIDE { 136 virtual void TearDown() OVERRIDE {
137 version_ = 0; 137 version_ = 0;
138 registration_ = 0; 138 registration_ = 0;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 NULL)); 381 NULL));
382 version_->AddControllee(host.get()); 382 version_->AddControllee(host.get());
383 EXPECT_FALSE(version_->stop_worker_timer_.IsRunning()); 383 EXPECT_FALSE(version_->stop_worker_timer_.IsRunning());
384 384
385 // The timer should be running if the controllee is removed. 385 // The timer should be running if the controllee is removed.
386 version_->RemoveControllee(host.get()); 386 version_->RemoveControllee(host.get());
387 EXPECT_TRUE(version_->stop_worker_timer_.IsRunning()); 387 EXPECT_TRUE(version_->stop_worker_timer_.IsRunning());
388 } 388 }
389 389
390 } // namespace content 390 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698