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

Side by Side Diff: ash/shell/window_watcher_unittest.cc

Issue 10834185: A unit test that creates a situation that crashed (bug 130306) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include ordering Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/ash.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/shell/window_watcher.h"
6
7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h"
9 #include "ash/shell/shell_delegate_impl.h"
10 #include "ash/test/ash_test_base.h"
11 #include "ui/aura/root_window.h"
12
13 namespace ash {
14
15 typedef test::AshTestBase WindowWatcherTest;
16
17 // This test verifies that shell can be torn down without causing failures
18 // bug http://code.google.com/p/chromium/issues/detail?id=130332
19 TEST_F(WindowWatcherTest, ShellDeleteInstance) {
20 scoped_ptr<ash::shell::WindowWatcher> window_watcher;
21 Shell::DeleteInstance();
22
23 shell::ShellDelegateImpl* delegate = new ash::shell::ShellDelegateImpl;
24 Shell::CreateInstance(delegate);
25
26 Shell::GetPrimaryRootWindow()->ShowRootWindow();
27 window_watcher.reset(new ash::shell::WindowWatcher);
28
29 delegate->SetWatcher(window_watcher.get());
30 Shell::GetPrimaryRootWindow()->Hide();
31 window_watcher.reset();
32 delegate->SetWatcher(NULL);
33 }
34
35 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698