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

Side by Side Diff: chrome/browser/cocoa/hung_renderer_controller_unittest.mm

Issue 151009: Removes the ability to close or resize the hung renderer dialog on Mac.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/browser/cocoa/hung_renderer_controller.mm ('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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/scoped_nsobject.h" 7 #import "base/scoped_nsobject.h"
8 #include "chrome/browser/cocoa/browser_test_helper.h" 8 #include "chrome/browser/cocoa/browser_test_helper.h"
9 #include "chrome/browser/cocoa/cocoa_test_helper.h" 9 #include "chrome/browser/cocoa/cocoa_test_helper.h"
10 #import "chrome/browser/cocoa/hung_renderer_controller.h" 10 #import "chrome/browser/cocoa/hung_renderer_controller.h"
(...skipping 10 matching lines...) Expand all
21 initWithWindowNibName:@"HungRendererDialog"]; 21 initWithWindowNibName:@"HungRendererDialog"];
22 } 22 }
23 23
24 HungRendererController* hung_renderer_controller_; // owned by its window 24 HungRendererController* hung_renderer_controller_; // owned by its window
25 }; 25 };
26 26
27 TEST_F(HungRendererControllerTest, TestShowAndClose) { 27 TEST_F(HungRendererControllerTest, TestShowAndClose) {
28 // Doesn't test much functionality-wise, but makes sure we can 28 // Doesn't test much functionality-wise, but makes sure we can
29 // display and tear down a window. 29 // display and tear down a window.
30 [hung_renderer_controller_ showWindow:nil]; 30 [hung_renderer_controller_ showWindow:nil];
31 [[hung_renderer_controller_ window] performClose:nil]; 31 // Cannot call performClose:, because the close button is disabled.
32 [hung_renderer_controller_ close];
32 } 33 }
33 34
34 TEST_F(HungRendererControllerTest, TestKillButton) { 35 TEST_F(HungRendererControllerTest, TestKillButton) {
35 // We can't test killing a process because we have no running 36 // We can't test killing a process because we have no running
36 // process to kill, but we can make sure that pressing the kill 37 // process to kill, but we can make sure that pressing the kill
37 // button closes the window. 38 // button closes the window.
38 [hung_renderer_controller_ showWindow:nil]; 39 [hung_renderer_controller_ showWindow:nil];
39 [[hung_renderer_controller_ killButton] performClick:nil]; 40 [[hung_renderer_controller_ killButton] performClick:nil];
40 } 41 }
41 42
42 TEST_F(HungRendererControllerTest, TestWaitButton) { 43 TEST_F(HungRendererControllerTest, TestWaitButton) {
43 // We can't test waiting because we have no running process to wait 44 // We can't test waiting because we have no running process to wait
44 // for, but we can make sure that pressing the wait button closes 45 // for, but we can make sure that pressing the wait button closes
45 // the window. 46 // the window.
46 [hung_renderer_controller_ showWindow:nil]; 47 [hung_renderer_controller_ showWindow:nil];
47 [[hung_renderer_controller_ waitButton] performClick:nil]; 48 [[hung_renderer_controller_ waitButton] performClick:nil];
48 } 49 }
49 50
50 } // namespace 51 } // namespace
51 52
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/hung_renderer_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698