| 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/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ui::PAGE_TRANSITION_LINK, false); | 125 ui::PAGE_TRANSITION_LINK, false); |
| 126 browser()->tab_strip_model()->GetActiveWebContents()->OpenURL(params); | 126 browser()->tab_strip_model()->GetActiveWebContents()->OpenURL(params); |
| 127 | 127 |
| 128 EXPECT_EQ(0, accepted_count_); | 128 EXPECT_EQ(0, accepted_count_); |
| 129 EXPECT_EQ(0, canceled_count_); | 129 EXPECT_EQ(0, canceled_count_); |
| 130 EXPECT_EQ(1, closed_count_); | 130 EXPECT_EQ(1, closed_count_); |
| 131 } | 131 } |
| 132 | 132 |
| 133 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) { | 133 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) { |
| 134 base::ThreadTaskRunnerHandle::Get()->PostTask( | 134 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 135 FROM_HERE, base::Bind(&chrome::AttemptExit)); | 135 FROM_HERE, base::BindOnce(&chrome::AttemptExit)); |
| 136 content::RunMessageLoop(); | 136 content::RunMessageLoop(); |
| 137 EXPECT_EQ(0, accepted_count_); | 137 EXPECT_EQ(0, accepted_count_); |
| 138 EXPECT_EQ(0, canceled_count_); | 138 EXPECT_EQ(0, canceled_count_); |
| 139 EXPECT_EQ(1, closed_count_); | 139 EXPECT_EQ(1, closed_count_); |
| 140 } | 140 } |
| OLD | NEW |