| 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 "ui/aura/test/test_windows.h" | 5 #include "ui/aura/test/test_windows.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, | 42 Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, |
| 43 ui::wm::WindowType type, | 43 ui::wm::WindowType type, |
| 44 int id, | 44 int id, |
| 45 const gfx::Rect& bounds, | 45 const gfx::Rect& bounds, |
| 46 Window* parent) { | 46 Window* parent) { |
| 47 Window* window = new Window(delegate); | 47 Window* window = new Window(delegate); |
| 48 window->set_id(id); | 48 window->set_id(id); |
| 49 window->SetType(type); | 49 window->SetType(type); |
| 50 window->Init(ui::LAYER_TEXTURED); | 50 window->Init(ui::LAYER_TEXTURED); |
| 51 window->SetProperty(aura::client::kCanMaximizeKey, true); | 51 window->SetProperty(aura::client::kResizeBehaviorKey, |
| 52 ui::mojom::kResizeBehaviorCanResize | |
| 53 ui::mojom::kResizeBehaviorCanMaximize); |
| 52 window->SetBounds(bounds); | 54 window->SetBounds(bounds); |
| 53 window->Show(); | 55 window->Show(); |
| 54 if (parent) | 56 if (parent) |
| 55 parent->AddChild(window); | 57 parent->AddChild(window); |
| 56 return window; | 58 return window; |
| 57 } | 59 } |
| 58 | 60 |
| 59 template <typename T> | 61 template <typename T> |
| 60 bool ObjectIsAbove(T* upper, T* lower) { | 62 bool ObjectIsAbove(T* upper, T* lower) { |
| 61 DCHECK_EQ(upper->parent(), lower->parent()); | 63 DCHECK_EQ(upper->parent(), lower->parent()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 82 i != parent->children().end(); ++i) { | 84 i != parent->children().end(); ++i) { |
| 83 if (!result.empty()) | 85 if (!result.empty()) |
| 84 result += " "; | 86 result += " "; |
| 85 result += base::IntToString((*i)->id()); | 87 result += base::IntToString((*i)->id()); |
| 86 } | 88 } |
| 87 return result; | 89 return result; |
| 88 } | 90 } |
| 89 | 91 |
| 90 } // namespace test | 92 } // namespace test |
| 91 } // namespace aura | 93 } // namespace aura |
| OLD | NEW |