OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/gfx/gdi_util.h" | 5 #include "app/gfx/gdi_util.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/simple_thread.h" | 8 #include "base/simple_thread.h" |
9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
11 #include "chrome/test/automation/browser_proxy.h" | 11 #include "chrome/test/automation/browser_proxy.h" |
12 #include "chrome/test/automation/tab_proxy.h" | 12 #include "chrome/test/automation/tab_proxy.h" |
13 #include "chrome/test/automation/window_proxy.h" | 13 #include "chrome/test/automation/window_proxy.h" |
14 #include "chrome/test/ui/ui_test.h" | 14 #include "chrome/test/ui/ui_test.h" |
15 #include "net/url_request/url_request_unittest.h" | 15 #include "net/url_request/url_request_unittest.h" |
16 #include "printing/image.h" | 16 #include "printing/image.h" |
17 #include "printing/printing_test.h" | 17 #include "printing/printing_test.h" |
18 #include "printing/native_metafile.h" | 18 #include "printing/native_metafile.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 using printing::Image; | 22 using printing::Image; |
23 | 23 |
24 const wchar_t* const kGenerateSwitch = L"print-layout-generate"; | 24 const char kGenerateSwitch[] = "print-layout-generate"; |
25 const wchar_t kDocRoot[] = L"chrome/test/data"; | 25 const wchar_t kDocRoot[] = L"chrome/test/data"; |
26 | 26 |
27 class PrintingLayoutTest : public PrintingTest<UITest> { | 27 class PrintingLayoutTest : public PrintingTest<UITest> { |
28 public: | 28 public: |
29 PrintingLayoutTest() { | 29 PrintingLayoutTest() { |
30 emf_path_ = browser_directory_; | 30 emf_path_ = browser_directory_; |
31 emf_path_ = emf_path_.AppendASCII("metafile_dumps"); | 31 emf_path_ = emf_path_.AppendASCII("metafile_dumps"); |
32 launch_arguments_.AppendSwitchWithValue(L"debug-print", | 32 launch_arguments_.AppendSwitchWithValue("debug-print", |
33 L'"' + emf_path_.value() + L'"'); | 33 L'"' + emf_path_.value() + L'"'); |
34 show_window_ = true; | 34 show_window_ = true; |
35 } | 35 } |
36 | 36 |
37 virtual void SetUp() { | 37 virtual void SetUp() { |
38 // Make sure there is no left overs. | 38 // Make sure there is no left overs. |
39 CleanupDumpDirectory(); | 39 CleanupDumpDirectory(); |
40 UITest::SetUp(); | 40 UITest::SetUp(); |
41 } | 41 } |
42 | 42 |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 443 |
444 // Force a navigation elsewhere to verify that it's fine with it. | 444 // Force a navigation elsewhere to verify that it's fine with it. |
445 url = server->TestServerPage("files/printing/test1.html"); | 445 url = server->TestServerPage("files/printing/test1.html"); |
446 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, | 446 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, |
447 tab_proxy->NavigateToURL(url)); | 447 tab_proxy->NavigateToURL(url)); |
448 } | 448 } |
449 CloseBrowserAndServer(); | 449 CloseBrowserAndServer(); |
450 | 450 |
451 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; | 451 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; |
452 } | 452 } |
OLD | NEW |