Index: ui/aura/window_unittest.cc |
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc |
index 727611363db84d9ffa435d52cf30f8f291ce9dc4..31bbf13b626c37190afcfff6214761b6e06665c0 100644 |
--- a/ui/aura/window_unittest.cc |
+++ b/ui/aura/window_unittest.cc |
@@ -45,7 +45,29 @@ |
#include "ui/gfx/vector2d.h" |
DECLARE_WINDOW_PROPERTY_TYPE(const char*) |
-DECLARE_WINDOW_PROPERTY_TYPE(int) |
+ |
+namespace { |
+ |
+class TestProperty { |
+ public: |
+ TestProperty() {} |
+ ~TestProperty() { |
+ last_deleted_ = this; |
+ } |
+ static TestProperty* last_deleted() { return last_deleted_; } |
+ |
+ private: |
+ static TestProperty* last_deleted_; |
+ DISALLOW_COPY_AND_ASSIGN(TestProperty); |
+}; |
+ |
+TestProperty* TestProperty::last_deleted_ = nullptr; |
+ |
+DEFINE_OWNED_WINDOW_PROPERTY_KEY(TestProperty, kOwnedKey, NULL); |
+ |
+} // namespace |
+ |
+DECLARE_WINDOW_PROPERTY_TYPE(TestProperty*); |
namespace aura { |
namespace test { |
@@ -1582,27 +1604,6 @@ TEST_F(WindowTest, Property) { |
EXPECT_EQ(std::string("squeamish"), w->GetProperty(kStringKey)); |
} |
-namespace { |
- |
-class TestProperty { |
- public: |
- TestProperty() {} |
- virtual ~TestProperty() { |
- last_deleted_ = this; |
- } |
- static TestProperty* last_deleted() { return last_deleted_; } |
- |
- private: |
- static TestProperty* last_deleted_; |
- DISALLOW_COPY_AND_ASSIGN(TestProperty); |
-}; |
- |
-TestProperty* TestProperty::last_deleted_ = NULL; |
- |
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(TestProperty, kOwnedKey, NULL); |
- |
-} // namespace |
- |
TEST_F(WindowTest, OwnedProperty) { |
scoped_ptr<Window> w(CreateTestWindowWithId(0, root_window())); |
EXPECT_EQ(NULL, w->GetProperty(kOwnedKey)); |