Chromium Code Reviews| 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 "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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 310 string16 mock_print_ticket; | 310 string16 mock_print_ticket; |
| 311 std::string mock_file_type; | 311 std::string mock_file_type; |
| 312 MockCloudPrintFlowHandler* handler = | 312 MockCloudPrintFlowHandler* handler = |
| 313 new MockCloudPrintFlowHandler(mock_path, mock_print_ticket, | 313 new MockCloudPrintFlowHandler(mock_path, mock_print_ticket, |
| 314 mock_title, mock_file_type, | 314 mock_title, mock_file_type, |
| 315 false, base::Closure()); | 315 false, base::Closure()); |
| 316 mock_flow_handler_ = handler->AsWeakPtr(); | 316 mock_flow_handler_ = handler->AsWeakPtr(); |
| 317 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(_)); | 317 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(_)); |
| 318 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(NULL)); | 318 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(NULL)); |
| 319 delegate_.reset(new CloudPrintWebDialogDelegate( | 319 delegate_.reset(new CloudPrintWebDialogDelegate( |
| 320 mock_flow_handler_.get(), 100, 100, std::string(), true, false)); | 320 mock_flow_handler_.get(), 100, 100, std::string(), false)); |
|
Albert Bodenhamer
2012/05/21 22:36:55
You'll need to drop the width and height and pass
| |
| 321 } | 321 } |
| 322 | 322 |
| 323 virtual void TearDown() { | 323 virtual void TearDown() { |
| 324 delegate_.reset(); | 324 delegate_.reset(); |
| 325 if (mock_flow_handler_) | 325 if (mock_flow_handler_) |
| 326 delete mock_flow_handler_.get(); | 326 delete mock_flow_handler_.get(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 MessageLoopForUI message_loop_; | 329 MessageLoopForUI message_loop_; |
| 330 content::TestBrowserThread ui_thread_; | 330 content::TestBrowserThread ui_thread_; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 353 delegate_->GetWebUIMessageHandlers(&handlers); | 353 delegate_->GetWebUIMessageHandlers(&handlers); |
| 354 delegate_.reset(); | 354 delegate_.reset(); |
| 355 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); | 355 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 // Testing for ExternalWebDialogUI needs a mock WebContents, mock | 358 // Testing for ExternalWebDialogUI needs a mock WebContents, mock |
| 359 // CloudPrintWebDialogDelegate (provided through the mock | 359 // CloudPrintWebDialogDelegate (provided through the mock |
| 360 // tab_contents) | 360 // tab_contents) |
| 361 | 361 |
| 362 // Testing for PrintDialogCloud needs a mock Browser. | 362 // Testing for PrintDialogCloud needs a mock Browser. |
| OLD | NEW |