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

Side by Side Diff: content/renderer/gpu/queue_message_swap_promise_unittest.cc

Issue 1262253004: Let IPC::SyncMessageFilter take advantage of thread-safe Send. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minus some code Created 5 years, 4 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 | « content/common/gpu/client/gpu_channel_host.cc ('k') | ipc/ipc_channel_proxy.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 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 "content/renderer/gpu/queue_message_swap_promise.h" 5 #include "content/renderer/gpu/queue_message_swap_promise.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "cc/output/swap_promise.h" 10 #include "cc/output/swap_promise.h"
(...skipping 13 matching lines...) Expand all
24 using RenderWidget::QueueMessageImpl; 24 using RenderWidget::QueueMessageImpl;
25 25
26 private: 26 private:
27 ~TestRenderWidget() override {} 27 ~TestRenderWidget() override {}
28 28
29 DISALLOW_COPY_AND_ASSIGN(TestRenderWidget); 29 DISALLOW_COPY_AND_ASSIGN(TestRenderWidget);
30 }; 30 };
31 31
32 class TestSyncMessageFilter : public IPC::SyncMessageFilter { 32 class TestSyncMessageFilter : public IPC::SyncMessageFilter {
33 public: 33 public:
34 TestSyncMessageFilter() : IPC::SyncMessageFilter(NULL) {} 34 TestSyncMessageFilter() : IPC::SyncMessageFilter(NULL, false) {}
35 35
36 bool Send(IPC::Message* message) override { 36 bool Send(IPC::Message* message) override {
37 messages_.push_back(message); 37 messages_.push_back(message);
38 return true; 38 return true;
39 } 39 }
40 40
41 ScopedVector<IPC::Message>& messages() { return messages_; } 41 ScopedVector<IPC::Message>& messages() { return messages_; }
42 42
43 private: 43 private:
44 ~TestSyncMessageFilter() override {} 44 ~TestSyncMessageFilter() override {}
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 TEST_F(QueueMessageSwapPromiseTest, VisualStateSwapPromiseDidNotSwapSwapFails) { 314 TEST_F(QueueMessageSwapPromiseTest, VisualStateSwapPromiseDidNotSwapSwapFails) {
315 VisualStateSwapPromiseDidNotSwap(cc::SwapPromise::SWAP_FAILS); 315 VisualStateSwapPromiseDidNotSwap(cc::SwapPromise::SWAP_FAILS);
316 } 316 }
317 317
318 TEST_F(QueueMessageSwapPromiseTest, 318 TEST_F(QueueMessageSwapPromiseTest,
319 VisualStateSwapPromiseDidNotSwapActivationFails) { 319 VisualStateSwapPromiseDidNotSwapActivationFails) {
320 VisualStateSwapPromiseDidNotSwap(cc::SwapPromise::ACTIVATION_FAILS); 320 VisualStateSwapPromiseDidNotSwap(cc::SwapPromise::ACTIVATION_FAILS);
321 } 321 }
322 322
323 } // namespace content 323 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698