| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
| 8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
| 9 #include "chrome/browser/printing/print_preview_dialog_controller.h" | 9 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
| 10 #include "chrome/browser/printing/print_preview_test.h" | 10 #include "chrome/browser/printing/print_preview_test.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 EXPECT_NE(initiator_tab, preview_dialog); | 263 EXPECT_NE(initiator_tab, preview_dialog); |
| 264 EXPECT_EQ(2, browser()->tab_strip_model()->count()); | 264 EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
| 265 EXPECT_TRUE(IsShowingWebContentsModalDialog(initiator_tab)); | 265 EXPECT_TRUE(IsShowingWebContentsModalDialog(initiator_tab)); |
| 266 EXPECT_EQ(0, initiator_tester->GetNumberOfFocusCalls()); | 266 EXPECT_EQ(0, initiator_tester->GetNumberOfFocusCalls()); |
| 267 | 267 |
| 268 PrintPreviewUI* preview_ui = static_cast<PrintPreviewUI*>( | 268 PrintPreviewUI* preview_ui = static_cast<PrintPreviewUI*>( |
| 269 preview_dialog->GetWebUI()->GetController()); | 269 preview_dialog->GetWebUI()->GetController()); |
| 270 ASSERT_TRUE(preview_ui != NULL); | 270 ASSERT_TRUE(preview_ui != NULL); |
| 271 | 271 |
| 272 preview_ui->OnPrintPreviewDialogClosed(); | 272 preview_ui->OnPrintPreviewDialogClosed(); |
| 273 message_loop()->RunUntilIdle(); |
| 273 | 274 |
| 274 EXPECT_EQ(2, browser()->tab_strip_model()->count()); | 275 EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
| 275 EXPECT_FALSE(IsShowingWebContentsModalDialog(initiator_tab)); | 276 EXPECT_FALSE(IsShowingWebContentsModalDialog(initiator_tab)); |
| 276 EXPECT_EQ(1, initiator_tester->GetNumberOfFocusCalls()); | 277 EXPECT_EQ(1, initiator_tester->GetNumberOfFocusCalls()); |
| 277 } | 278 } |
| OLD | NEW |