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/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" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 EXPECT_EQ(1, canceled_count_); | 80 EXPECT_EQ(1, canceled_count_); |
81 } | 81 } |
82 | 82 |
83 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, CancelSelf) { | 83 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, CancelSelf) { |
84 delegate_->Cancel(); | 84 delegate_->Cancel(); |
85 EXPECT_EQ(0, accepted_count_); | 85 EXPECT_EQ(0, accepted_count_); |
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 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 |