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

Side by Side Diff: chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc

Issue 10409022: Move application lifetime functionality off BrowserList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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 "chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h" 5 #include "chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/lifetime/application_lifetime.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_list.h"
12 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" 12 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
13 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 class MockTabModalConfirmDialogDelegate : public TabModalConfirmDialogDelegate { 17 class MockTabModalConfirmDialogDelegate : public TabModalConfirmDialogDelegate {
18 public: 18 public:
19 explicit MockTabModalConfirmDialogDelegate(content::WebContents* web_contents) 19 explicit MockTabModalConfirmDialogDelegate(content::WebContents* web_contents)
20 : TabModalConfirmDialogDelegate(web_contents) {} 20 : TabModalConfirmDialogDelegate(web_contents) {}
21 21
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, CancelSelf) { 86 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, CancelSelf) {
87 EXPECT_CALL(*delegate_, OnCanceled()); 87 EXPECT_CALL(*delegate_, OnCanceled());
88 delegate_->Cancel(); 88 delegate_->Cancel();
89 } 89 }
90 90
91 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) { 91 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) {
92 EXPECT_CALL(*delegate_, OnCanceled()); 92 EXPECT_CALL(*delegate_, OnCanceled());
93 MessageLoopForUI::current()->PostTask(FROM_HERE, 93 MessageLoopForUI::current()->PostTask(FROM_HERE,
94 base::Bind(&BrowserList::AttemptExit)); 94 base::Bind(&browser::AttemptExit));
95 ui_test_utils::RunMessageLoop(); 95 ui_test_utils::RunMessageLoop();
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/update_recommended_dialog.cc ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698