| 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 "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/display/mouse_cursor_event_filter.h" | 10 #include "ash/display/mouse_cursor_event_filter.h" |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 ~ShellTest2() override {} | 499 ~ShellTest2() override {} |
| 500 | 500 |
| 501 protected: | 501 protected: |
| 502 std::unique_ptr<aura::Window> window_; | 502 std::unique_ptr<aura::Window> window_; |
| 503 | 503 |
| 504 private: | 504 private: |
| 505 DISALLOW_COPY_AND_ASSIGN(ShellTest2); | 505 DISALLOW_COPY_AND_ASSIGN(ShellTest2); |
| 506 }; | 506 }; |
| 507 | 507 |
| 508 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { | 508 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { |
| 509 // TODO: delete this test when conversion to mash is done. This test isn't | |
| 510 // applicable to mash as all windows must be destroyed before ash, that isn't | |
| 511 // the case with classic-ash where embedders can separately create | |
| 512 // aura::Windows. | |
| 513 if (Shell::GetAshConfig() == Config::MASH) | |
| 514 return; | |
| 515 | |
| 516 window_.reset(new aura::Window(NULL)); | 509 window_.reset(new aura::Window(NULL)); |
| 517 window_->Init(ui::LAYER_NOT_DRAWN); | 510 window_->Init(ui::LAYER_NOT_DRAWN); |
| 518 } | 511 } |
| 519 | 512 |
| 520 } // namespace ash | 513 } // namespace ash |
| OLD | NEW |