OLD | NEW |
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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "ppapi/shared_impl/resource.h" | 8 #include "ppapi/shared_impl/resource.h" |
9 #include "ppapi/shared_impl/resource_tracker.h" | 9 #include "ppapi/shared_impl/resource_tracker.h" |
10 #include "ppapi/shared_impl/tracker_base.h" | 10 #include "ppapi/shared_impl/tracker_base.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 instance_was_deleted_count = 0; | 58 instance_was_deleted_count = 0; |
59 } | 59 } |
60 virtual void TearDown() OVERRIDE { | 60 virtual void TearDown() OVERRIDE { |
61 my_tracker_base = NULL; | 61 my_tracker_base = NULL; |
62 TrackerBase::Init(NULL); | 62 TrackerBase::Init(NULL); |
63 } | 63 } |
64 | 64 |
65 // TrackerBase implementation. | 65 // TrackerBase implementation. |
66 virtual FunctionGroupBase* GetFunctionAPI( | 66 virtual FunctionGroupBase* GetFunctionAPI( |
67 PP_Instance inst, | 67 PP_Instance inst, |
68 pp::proxy::InterfaceID id) OVERRIDE { | 68 ppapi::proxy::InterfaceID id) OVERRIDE { |
69 return NULL; | 69 return NULL; |
70 } | 70 } |
71 virtual VarTracker* GetVarTracker() OVERRIDE { | 71 virtual VarTracker* GetVarTracker() OVERRIDE { |
72 return NULL; | 72 return NULL; |
73 } | 73 } |
74 virtual ResourceTracker* GetResourceTracker() OVERRIDE { | 74 virtual ResourceTracker* GetResourceTracker() OVERRIDE { |
75 return &resource_tracker_; | 75 return &resource_tracker_; |
76 } | 76 } |
77 | 77 |
78 ResourceTracker& resource_tracker() { return resource_tracker_; } | 78 ResourceTracker& resource_tracker() { return resource_tracker_; } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // a "last plugin ref was deleted" and a "instance was deleted" notification. | 138 // a "last plugin ref was deleted" and a "instance was deleted" notification. |
139 EXPECT_EQ(1, mock_resource_alive_count); | 139 EXPECT_EQ(1, mock_resource_alive_count); |
140 EXPECT_EQ(1, last_plugin_ref_was_deleted_count); | 140 EXPECT_EQ(1, last_plugin_ref_was_deleted_count); |
141 EXPECT_EQ(1, instance_was_deleted_count); | 141 EXPECT_EQ(1, instance_was_deleted_count); |
142 | 142 |
143 resource = NULL; | 143 resource = NULL; |
144 EXPECT_EQ(0, mock_resource_alive_count); | 144 EXPECT_EQ(0, mock_resource_alive_count); |
145 } | 145 } |
146 | 146 |
147 } // namespace ppapi | 147 } // namespace ppapi |
OLD | NEW |