OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/debug_marker_manager.h" | 5 #include "gpu/command_buffer/common/debug_marker_manager.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "ui/gl/gl_mock.h" | 7 #include "ui/gl/gl_mock.h" |
8 | 8 |
9 namespace gpu { | 9 namespace gpu { |
10 namespace gles2 { | 10 namespace gles2 { |
11 | 11 |
12 class DebugMarkerManagerTest : public testing::Test { | 12 class DebugMarkerManagerTest : public testing::Test { |
13 protected: | 13 protected: |
14 virtual void SetUp() { | 14 void SetUp() override {} |
15 } | |
16 | 15 |
17 virtual void TearDown() { | 16 void TearDown() override {} |
18 } | |
19 | 17 |
20 DebugMarkerManager manager_; | 18 DebugMarkerManager manager_; |
21 }; | 19 }; |
22 | 20 |
23 TEST_F(DebugMarkerManagerTest, Basic) { | 21 TEST_F(DebugMarkerManagerTest, Basic) { |
24 // Test we can get root | 22 // Test we can get root |
25 EXPECT_STREQ("", manager_.GetMarker().c_str()); | 23 EXPECT_STREQ("", manager_.GetMarker().c_str()); |
26 // Test it's safe to pop an empty stack. | 24 // Test it's safe to pop an empty stack. |
27 manager_.PopGroup(); | 25 manager_.PopGroup(); |
28 // Test we can still get root. | 26 // Test we can still get root. |
(...skipping 25 matching lines...) Expand all Loading... |
54 manager_.PopGroup(); | 52 manager_.PopGroup(); |
55 EXPECT_STREQ(".mark2", manager_.GetMarker().c_str()); | 53 EXPECT_STREQ(".mark2", manager_.GetMarker().c_str()); |
56 manager_.PopGroup(); | 54 manager_.PopGroup(); |
57 EXPECT_STREQ(".mark2", manager_.GetMarker().c_str()); | 55 EXPECT_STREQ(".mark2", manager_.GetMarker().c_str()); |
58 } | 56 } |
59 | 57 |
60 } // namespace gles2 | 58 } // namespace gles2 |
61 } // namespace gpu | 59 } // namespace gpu |
62 | 60 |
63 | 61 |
OLD | NEW |