| 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 "base/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/webui/print_preview/print_preview_ui.h" | 15 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 17 #include "chrome/test/base/browser_with_test_window_test.h" | 17 #include "chrome/test/base/browser_with_test_window_test.h" |
| 18 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 18 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 19 #include "content/public/browser/plugin_service.h" | 19 #include "content/public/browser/plugin_service.h" |
| 20 #include "content/public/browser/site_instance.h" | 20 #include "content/public/browser/site_instance.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "printing/print_job_constants.h" | 22 #include "printing/print_job_constants.h" |
| 23 #include "webkit/plugins/npapi/mock_plugin_list.h" | |
| 24 | 23 |
| 25 using content::WebContents; | 24 using content::WebContents; |
| 26 using web_modal::WebContentsModalDialogManager; | 25 using web_modal::WebContentsModalDialogManager; |
| 27 | 26 |
| 28 namespace { | 27 namespace { |
| 29 | 28 |
| 30 base::RefCountedBytes* CreateTestData() { | 29 base::RefCountedBytes* CreateTestData() { |
| 31 const unsigned char blob1[] = | 30 const unsigned char blob1[] = |
| 32 "12346102356120394751634516591348710478123649165419234519234512349134"; | 31 "12346102356120394751634516591348710478123649165419234519234512349134"; |
| 33 std::vector<unsigned char> preview_data(blob1, blob1 + sizeof(blob1)); | 32 std::vector<unsigned char> preview_data(blob1, blob1 + sizeof(blob1)); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 cancel = false; | 230 cancel = false; |
| 232 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kFirstRequestId, | 231 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kFirstRequestId, |
| 233 &cancel); | 232 &cancel); |
| 234 EXPECT_TRUE(cancel); | 233 EXPECT_TRUE(cancel); |
| 235 | 234 |
| 236 cancel = true; | 235 cancel = true; |
| 237 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kSecondRequestId, | 236 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kSecondRequestId, |
| 238 &cancel); | 237 &cancel); |
| 239 EXPECT_FALSE(cancel); | 238 EXPECT_FALSE(cancel); |
| 240 } | 239 } |
| OLD | NEW |