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

Side by Side Diff: gpu/command_buffer/service/valuebuffer_manager_unittest.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/command_buffer/service/valuebuffer_manager.h" 5 #include "gpu/command_buffer/service/valuebuffer_manager.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "gpu/command_buffer/common/gles2_cmd_format.h" 10 #include "gpu/command_buffer/common/gles2_cmd_format.h"
(...skipping 14 matching lines...) Expand all
25 25
26 class MockSubscriptionRefSetObserver : public SubscriptionRefSet::Observer { 26 class MockSubscriptionRefSetObserver : public SubscriptionRefSet::Observer {
27 public: 27 public:
28 MOCK_METHOD1(OnAddSubscription, void(unsigned int target)); 28 MOCK_METHOD1(OnAddSubscription, void(unsigned int target));
29 MOCK_METHOD1(OnRemoveSubscription, void(unsigned int target)); 29 MOCK_METHOD1(OnRemoveSubscription, void(unsigned int target));
30 }; 30 };
31 31
32 class ValuebufferManagerTest : public GpuServiceTest { 32 class ValuebufferManagerTest : public GpuServiceTest {
33 public: 33 public:
34 ValuebufferManagerTest() {} 34 ValuebufferManagerTest() {}
35 ~ValuebufferManagerTest() {} 35 ~ValuebufferManagerTest() override {}
36 36
37 void SetUp() override { 37 void SetUp() override {
38 GpuServiceTest::SetUp(); 38 GpuServiceTest::SetUp();
39 subscription_ref_set_ = new SubscriptionRefSet(); 39 subscription_ref_set_ = new SubscriptionRefSet();
40 pending_state_map_ = new ValueStateMap(); 40 pending_state_map_ = new ValueStateMap();
41 subscription_ref_set_->AddObserver(&mock_observer_); 41 subscription_ref_set_->AddObserver(&mock_observer_);
42 manager_.reset(new ValuebufferManager(subscription_ref_set_.get(), 42 manager_.reset(new ValuebufferManager(subscription_ref_set_.get(),
43 pending_state_map_.get())); 43 pending_state_map_.get()));
44 } 44 }
45 45
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 valuebuffer1->RemoveSubscription(GL_MOUSE_POSITION_CHROMIUM); 143 valuebuffer1->RemoveSubscription(GL_MOUSE_POSITION_CHROMIUM);
144 // Ensure the manager still thinks a buffer has a reference to the 144 // Ensure the manager still thinks a buffer has a reference to the
145 // subscription target. 145 // subscription target.
146 EXPECT_CALL(mock_observer_, OnRemoveSubscription(GL_MOUSE_POSITION_CHROMIUM)) 146 EXPECT_CALL(mock_observer_, OnRemoveSubscription(GL_MOUSE_POSITION_CHROMIUM))
147 .Times(1); 147 .Times(1);
148 valuebuffer2->RemoveSubscription(GL_MOUSE_POSITION_CHROMIUM); 148 valuebuffer2->RemoveSubscription(GL_MOUSE_POSITION_CHROMIUM);
149 } 149 }
150 150
151 } // namespace gles2 151 } // namespace gles2
152 } // namespace gpu 152 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator.cc ('k') | gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698