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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/common/chrome_switches.h" | 6 #include "chrome/common/chrome_switches.h" |
7 #include "chrome/common/print_messages.h" | 7 #include "chrome/common/print_messages.h" |
8 #include "chrome/renderer/mock_printer.h" | 8 #include "chrome/renderer/mock_printer.h" |
9 #include "chrome/renderer/printing/print_web_view_helper.h" | 9 #include "chrome/renderer/printing/print_web_view_helper.h" |
10 #include "chrome/test/base/chrome_render_view_test.h" | 10 #include "chrome/test/base/chrome_render_view_test.h" |
11 #include "content/public/renderer/render_view.h" | 11 #include "content/public/renderer/render_view.h" |
12 #include "printing/print_job_constants.h" | 12 #include "printing/print_job_constants.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 14 #include "third_party/WebKit/public/platform/WebString.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
18 | 18 |
19 #if defined(OS_WIN) || defined(OS_MACOSX) | 19 #if defined(OS_WIN) || defined(OS_MACOSX) |
20 #include "base/file_util.h" | 20 #include "base/file_util.h" |
21 #include "printing/image.h" | 21 #include "printing/image.h" |
22 | 22 |
23 using WebKit::WebFrame; | 23 using WebKit::WebFrame; |
24 using WebKit::WebString; | 24 using WebKit::WebString; |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 chrome_render_thread_->printer()->ResetPrinter(); | 967 chrome_render_thread_->printer()->ResetPrinter(); |
968 VerifyPagesPrinted(false); | 968 VerifyPagesPrinted(false); |
969 | 969 |
970 // Pretend user will print, should not be throttled. | 970 // Pretend user will print, should not be throttled. |
971 chrome_render_thread_->set_print_dialog_user_response(true); | 971 chrome_render_thread_->set_print_dialog_user_response(true); |
972 PrintWithJavaScript(); | 972 PrintWithJavaScript(); |
973 VerifyPagesPrinted(true); | 973 VerifyPagesPrinted(true); |
974 } | 974 } |
975 | 975 |
976 } // namespace printing | 976 } // namespace printing |
OLD | NEW |