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

Side by Side Diff: content/browser/startup_task_runner_unittest.cc

Issue 1942053002: Deletes base::MessageLoop::set_thread_name(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed media_unittests Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/startup_task_runner.h" 5 #include "content/browser/startup_task_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool PostDelayedTask(const tracked_objects::Location& location, 99 bool PostDelayedTask(const tracked_objects::Location& location,
100 const Closure& closure, 100 const Closure& closure,
101 base::TimeDelta delta) override { 101 base::TimeDelta delta) override {
102 return mock_->PostDelayedTask(location, closure, delta); 102 return mock_->PostDelayedTask(location, closure, delta);
103 } 103 }
104 bool PostNonNestableDelayedTask(const tracked_objects::Location& location, 104 bool PostNonNestableDelayedTask(const tracked_objects::Location& location,
105 const Closure& closure, 105 const Closure& closure,
106 base::TimeDelta delta) override { 106 base::TimeDelta delta) override {
107 return mock_->PostNonNestableDelayedTask(location, closure, delta); 107 return mock_->PostNonNestableDelayedTask(location, closure, delta);
108 } 108 }
109 std::string GetThreadName() const override { return std::string(); }
109 110
110 private: 111 private:
111 MockTaskRunner* mock_; 112 MockTaskRunner* mock_;
112 ~TaskRunnerProxy() override {} 113 ~TaskRunnerProxy() override {}
113 }; 114 };
114 115
115 TEST_F(StartupTaskRunnerTest, SynchronousExecution) { 116 TEST_F(StartupTaskRunnerTest, SynchronousExecution) {
116 MockTaskRunner mock_runner; 117 MockTaskRunner mock_runner;
117 scoped_refptr<TaskRunnerProxy> proxy = new TaskRunnerProxy(&mock_runner); 118 scoped_refptr<TaskRunnerProxy> proxy = new TaskRunnerProxy(&mock_runner);
118 119
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 EXPECT_EQ(observer_calls, 1); 311 EXPECT_EQ(observer_calls, 1);
311 EXPECT_EQ(observer_result, 1); 312 EXPECT_EQ(observer_result, 1);
312 313
313 // Check that running synchronously now doesn't do anything 314 // Check that running synchronously now doesn't do anything
314 runner.RunAllTasksNow(); 315 runner.RunAllTasksNow();
315 EXPECT_EQ(observer_calls, 1); 316 EXPECT_EQ(observer_calls, 1);
316 EXPECT_EQ(task_count, 1); 317 EXPECT_EQ(task_count, 1);
317 } 318 }
318 } // namespace 319 } // namespace
319 } // namespace content 320 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698