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 "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "chrome/common/chrome_switches.h" | 7 #include "chrome/common/chrome_switches.h" |
8 #include "chrome/common/print_messages.h" | 8 #include "chrome/common/print_messages.h" |
9 #include "chrome/renderer/printing/mock_printer.h" | 9 #include "chrome/renderer/printing/mock_printer.h" |
10 #include "chrome/renderer/printing/print_web_view_helper.h" | 10 #include "chrome/renderer/printing/print_web_view_helper.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 using blink::WebFrame; | 25 using blink::WebFrame; |
26 using blink::WebLocalFrame; | 26 using blink::WebLocalFrame; |
27 using blink::WebString; | 27 using blink::WebString; |
28 #endif | 28 #endif |
29 | 29 |
30 namespace printing { | 30 namespace printing { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
| 34 #if !defined(OS_CHROMEOS) |
| 35 |
34 // A simple web page. | 36 // A simple web page. |
35 const char kHelloWorldHTML[] = "<body><p>Hello World!</p></body>"; | 37 const char kHelloWorldHTML[] = "<body><p>Hello World!</p></body>"; |
36 | 38 |
37 #if !defined(OS_CHROMEOS) | |
38 | |
39 // A simple webpage with a button to print itself with. | 39 // A simple webpage with a button to print itself with. |
40 const char kPrintOnUserAction[] = | 40 const char kPrintOnUserAction[] = |
41 "<body>" | 41 "<body>" |
42 " <button id=\"print\" onclick=\"window.print();\">Hello World!</button>" | 42 " <button id=\"print\" onclick=\"window.print();\">Hello World!</button>" |
43 "</body>"; | 43 "</body>"; |
44 | 44 |
45 // HTML with 3 pages. | 45 // HTML with 3 pages. |
46 const char kMultipageHTML[] = | 46 const char kMultipageHTML[] = |
47 "<html><head><style>" | 47 "<html><head><style>" |
48 ".break { page-break-after: always; }" | 48 ".break { page-break-after: always; }" |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 CreatePrintSettingsDictionary(&dict); | 988 CreatePrintSettingsDictionary(&dict); |
989 OnPrintForPrintPreview(dict); | 989 OnPrintForPrintPreview(dict); |
990 | 990 |
991 VerifyPrintFailed(true); | 991 VerifyPrintFailed(true); |
992 VerifyPagesPrinted(false); | 992 VerifyPagesPrinted(false); |
993 } | 993 } |
994 | 994 |
995 #endif // !defined(OS_CHROMEOS) | 995 #endif // !defined(OS_CHROMEOS) |
996 | 996 |
997 } // namespace printing | 997 } // namespace printing |
OLD | NEW |