Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: ash/shell_unittest.cc

Issue 2897663002: chromeos: makes it possible for windows to outlive WindowTreeClient (Closed)
Patch Set: cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/aura/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/aura/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698