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

Side by Side Diff: webkit/child/worker_task_runner_unittest.cc

Issue 61553006: Rename WebKit namespace to blink (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/child/worker_task_runner.cc ('k') | webkit/common/cursors/webcursor.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 5 #include "base/logging.h"
6 #include "testing/gmock/include/gmock/gmock.h" 6 #include "testing/gmock/include/gmock/gmock.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "webkit/child/worker_task_runner.h" 8 #include "webkit/child/worker_task_runner.h"
9 9
10 namespace webkit_glue { 10 namespace webkit_glue {
11 11
12 class WorkerTaskRunnerTest : public testing::Test { 12 class WorkerTaskRunnerTest : public testing::Test {
13 public: 13 public:
14 void FakeStart() { 14 void FakeStart() {
15 task_runner_.OnWorkerRunLoopStarted(WebKit::WebWorkerRunLoop()); 15 task_runner_.OnWorkerRunLoopStarted(blink::WebWorkerRunLoop());
16 } 16 }
17 void FakeStop() { 17 void FakeStop() {
18 task_runner_.OnWorkerRunLoopStopped(WebKit::WebWorkerRunLoop()); 18 task_runner_.OnWorkerRunLoopStopped(blink::WebWorkerRunLoop());
19 } 19 }
20 WorkerTaskRunner task_runner_; 20 WorkerTaskRunner task_runner_;
21 }; 21 };
22 22
23 class MockObserver : public WorkerTaskRunner::Observer { 23 class MockObserver : public WorkerTaskRunner::Observer {
24 public: 24 public:
25 MOCK_METHOD0(OnWorkerRunLoopStopped, void()); 25 MOCK_METHOD0(OnWorkerRunLoopStopped, void());
26 void RemoveSelfOnNotify() { 26 void RemoveSelfOnNotify() {
27 ON_CALL(*this, OnWorkerRunLoopStopped()).WillByDefault( 27 ON_CALL(*this, OnWorkerRunLoopStopped()).WillByDefault(
28 testing::Invoke(this, &MockObserver::RemoveSelf)); 28 testing::Invoke(this, &MockObserver::RemoveSelf));
(...skipping 18 matching lines...) Expand all
47 MockObserver o; 47 MockObserver o;
48 o.RemoveSelfOnNotify(); 48 o.RemoveSelfOnNotify();
49 o.runner_ = &task_runner_; 49 o.runner_ = &task_runner_;
50 EXPECT_CALL(o, OnWorkerRunLoopStopped()).Times(1); 50 EXPECT_CALL(o, OnWorkerRunLoopStopped()).Times(1);
51 FakeStart(); 51 FakeStart();
52 task_runner_.AddStopObserver(&o); 52 task_runner_.AddStopObserver(&o);
53 FakeStop(); 53 FakeStop();
54 } 54 }
55 55
56 } 56 }
OLDNEW
« no previous file with comments | « webkit/child/worker_task_runner.cc ('k') | webkit/common/cursors/webcursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698