OLD | NEW |
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/strings/utf_string_conversions.h" |
9 #include "chrome/browser/lifetime/application_lifetime.h" | 9 #include "chrome/browser/lifetime/application_lifetime.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_dialogs.h" | 11 #include "chrome/browser/ui/browser_dialogs.h" |
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
13 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 MockTabModalConfirmDialogDelegate::MockTabModalConfirmDialogDelegate( | 16 MockTabModalConfirmDialogDelegate::MockTabModalConfirmDialogDelegate( |
17 content::WebContents* web_contents, | 17 content::WebContents* web_contents, |
18 Delegate* delegate) | 18 Delegate* delegate) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 EXPECT_EQ(1, canceled_count_); | 86 EXPECT_EQ(1, canceled_count_); |
87 } | 87 } |
88 | 88 |
89 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) { | 89 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) { |
90 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 90 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
91 base::Bind(&chrome::AttemptExit)); | 91 base::Bind(&chrome::AttemptExit)); |
92 content::RunMessageLoop(); | 92 content::RunMessageLoop(); |
93 EXPECT_EQ(0, accepted_count_); | 93 EXPECT_EQ(0, accepted_count_); |
94 EXPECT_EQ(1, canceled_count_); | 94 EXPECT_EQ(1, canceled_count_); |
95 } | 95 } |
OLD | NEW |