| Index: ui/aura/window_unittest.cc
|
| diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
|
| index 31bbf13b626c37190afcfff6214761b6e06665c0..727611363db84d9ffa435d52cf30f8f291ce9dc4 100644
|
| --- a/ui/aura/window_unittest.cc
|
| +++ b/ui/aura/window_unittest.cc
|
| @@ -45,29 +45,7 @@
|
| #include "ui/gfx/vector2d.h"
|
|
|
| DECLARE_WINDOW_PROPERTY_TYPE(const char*)
|
| -
|
| -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*);
|
| +DECLARE_WINDOW_PROPERTY_TYPE(int)
|
|
|
| namespace aura {
|
| namespace test {
|
| @@ -1603,6 +1581,27 @@
|
| w->ClearProperty(kStringKey);
|
| 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()));
|
|
|