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 "base/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" |
11 #include "chrome/browser/printing/print_view_manager.h" | 11 #include "chrome/browser/printing/print_view_manager.h" |
12 #include "chrome/browser/ui/browser_commands.h" | 12 #include "chrome/browser/ui/browser_commands.h" |
13 #include "chrome/browser/ui/browser_tabstrip.h" | 13 #include "chrome/browser/ui/browser_tabstrip.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
15 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | 15 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
16 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 16 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/test/base/browser_with_test_window_test.h" | 18 #include "chrome/test/base/browser_with_test_window_test.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 message_loop()->RunUntilIdle(); |
274 | 274 |
275 EXPECT_EQ(2, browser()->tab_strip_model()->count()); | 275 EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
276 EXPECT_FALSE(IsShowingWebContentsModalDialog(initiator_tab)); | 276 EXPECT_FALSE(IsShowingWebContentsModalDialog(initiator_tab)); |
277 EXPECT_EQ(1, initiator_tester->GetNumberOfFocusCalls()); | 277 EXPECT_EQ(1, initiator_tester->GetNumberOfFocusCalls()); |
278 } | 278 } |
OLD | NEW |