| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/printing/print_dialog_cloud.h" | 5 #include "chrome/browser/printing/print_dialog_cloud.h" |
| 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" |
| 7 | 7 |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 | 192 |
| 193 CreateDialogForTest(); | 193 CreateDialogForTest(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void CreateDialogForTest() { | 196 void CreateDialogForTest() { |
| 197 FilePath path_to_pdf = | 197 FilePath path_to_pdf = |
| 198 test_data_directory_.AppendASCII("printing/cloud_print_uitest.pdf"); | 198 test_data_directory_.AppendASCII("printing/cloud_print_uitest.pdf"); |
| 199 BrowserThread::PostTask( | 199 BrowserThread::PostTask( |
| 200 BrowserThread::UI, FROM_HERE, | 200 BrowserThread::UI, FROM_HERE, |
| 201 NewRunnableFunction(&PrintDialogCloud::CreateDialogImpl, path_to_pdf)); | 201 NewRunnableFunction(&PrintDialogCloud::CreateDialogImpl, |
| 202 path_to_pdf, |
| 203 string16(), |
| 204 true)); |
| 202 } | 205 } |
| 203 | 206 |
| 204 bool handler_added_; | 207 bool handler_added_; |
| 205 std::string scheme_; | 208 std::string scheme_; |
| 206 std::string host_name_; | 209 std::string host_name_; |
| 207 FilePath test_data_directory_; | 210 FilePath test_data_directory_; |
| 208 AutoQuitDelegate delegate_; | 211 AutoQuitDelegate delegate_; |
| 209 }; | 212 }; |
| 210 | 213 |
| 211 net::URLRequestJob* PrintDialogCloudTest::Factory(net::URLRequest* request, | 214 net::URLRequestJob* PrintDialogCloudTest::Factory(net::URLRequest* request, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 251 |
| 249 std::wstring window_print(L"window.print()"); | 252 std::wstring window_print(L"window.print()"); |
| 250 browser()->GetSelectedTabContents()->render_view_host()-> | 253 browser()->GetSelectedTabContents()->render_view_host()-> |
| 251 ExecuteJavascriptInWebFrame(std::wstring(), window_print); | 254 ExecuteJavascriptInWebFrame(std::wstring(), window_print); |
| 252 | 255 |
| 253 ui_test_utils::RunMessageLoop(); | 256 ui_test_utils::RunMessageLoop(); |
| 254 | 257 |
| 255 ASSERT_TRUE(TestController::GetInstance()->result()); | 258 ASSERT_TRUE(TestController::GetInstance()->result()); |
| 256 } | 259 } |
| 257 #endif | 260 #endif |
| OLD | NEW |