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

Side by Side Diff: chrome/browser/ui/tab_modal_confirm_dialog_browsertest_mac.mm

Issue 10972002: chrome: Add TabModalConfirmDialog interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no else after return Created 8 years, 2 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
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 "chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h"
6
7 #include "chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 TabModalConfirmDialog* TabModalConfirmDialogTest::CreateTestDialog(
11 TabModalConfirmDialogDelegate* delegate, TabContents* tab_contents) {
12 return new TabModalConfirmDialogMac(delegate, tab_contents);
13 }
14
15 void TabModalConfirmDialogTest::CloseDialog(bool accept) {
16 NSWindow* window = [(NSAlert*)dialog_->sheet() window];
17 ASSERT_TRUE(window);
18 ASSERT_TRUE(dialog_->is_sheet_open());
19 [NSApp endSheet:window
20 returnCode:accept ? NSAlertFirstButtonReturn :
21 NSAlertSecondButtonReturn];
22 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc ('k') | chrome/browser/ui/views/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698