Chromium Code Reviews| Index: ui/aura/window_unittest.cc |
| diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc |
| index 727611363db84d9ffa435d52cf30f8f291ce9dc4..0b98ccfa7efa21c785a8a361f3100b639f5c624a 100644 |
| --- a/ui/aura/window_unittest.cc |
| +++ b/ui/aura/window_unittest.cc |
| @@ -47,6 +47,29 @@ |
| DECLARE_WINDOW_PROPERTY_TYPE(const char*) |
| DECLARE_WINDOW_PROPERTY_TYPE(int) |
| +namespace { |
| + |
| +class TestProperty { |
| + public: |
| + TestProperty() {} |
| + virtual ~TestProperty() { |
|
sky
2014/12/18 17:46:08
nit: no virtual but override.
oshima
2014/12/18 18:14:42
Done.
|
| + 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; |
|
sky
2014/12/18 17:46:08
nullptr
oshima
2014/12/18 18:14:42
Done.
|
| + |
| +DEFINE_OWNED_WINDOW_PROPERTY_KEY(TestProperty, kOwnedKey, NULL); |
| + |
| +} // namespace |
| + |
| +DECLARE_WINDOW_PROPERTY_TYPE(TestProperty*); |
| + |
| namespace aura { |
| namespace test { |
| @@ -1582,27 +1605,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)); |