| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 protected: | 290 protected: |
| 291 virtual void SetUp() { | 291 virtual void SetUp() { |
| 292 FilePath mock_path; | 292 FilePath mock_path; |
| 293 string16 mock_title; | 293 string16 mock_title; |
| 294 MockCloudPrintFlowHandler* handler = | 294 MockCloudPrintFlowHandler* handler = |
| 295 new MockCloudPrintFlowHandler(mock_path, mock_title); | 295 new MockCloudPrintFlowHandler(mock_path, mock_title); |
| 296 mock_flow_handler_ = handler->AsWeakPtr(); | 296 mock_flow_handler_ = handler->AsWeakPtr(); |
| 297 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(_)); | 297 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(_)); |
| 298 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(NULL)); | 298 EXPECT_CALL(*mock_flow_handler_.get(), SetDialogDelegate(NULL)); |
| 299 delegate_.reset(new CloudPrintHtmlDialogDelegate( | 299 delegate_.reset(new CloudPrintHtmlDialogDelegate( |
| 300 mock_flow_handler_.get(), 100, 100, std::string())); | 300 mock_flow_handler_.get(), 100, 100, std::string(), true)); |
| 301 } | 301 } |
| 302 | 302 |
| 303 virtual void TearDown() { | 303 virtual void TearDown() { |
| 304 delegate_.reset(); | 304 delegate_.reset(); |
| 305 if (mock_flow_handler_) | 305 if (mock_flow_handler_) |
| 306 delete mock_flow_handler_.get(); | 306 delete mock_flow_handler_.get(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 MessageLoopForUI message_loop_; | 309 MessageLoopForUI message_loop_; |
| 310 BrowserThread ui_thread_; | 310 BrowserThread ui_thread_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 333 delegate_->GetDOMMessageHandlers(&handlers); | 333 delegate_->GetDOMMessageHandlers(&handlers); |
| 334 delegate_.reset(); | 334 delegate_.reset(); |
| 335 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); | 335 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); |
| 336 } | 336 } |
| 337 | 337 |
| 338 // Testing for ExternalHtmlDialogUI needs a mock TabContents, mock | 338 // Testing for ExternalHtmlDialogUI needs a mock TabContents, mock |
| 339 // CloudPrintHtmlDialogDelegate (provided through the mock | 339 // CloudPrintHtmlDialogDelegate (provided through the mock |
| 340 // tab_contents) | 340 // tab_contents) |
| 341 | 341 |
| 342 // Testing for PrintDialogCloud needs a mock Browser. | 342 // Testing for PrintDialogCloud needs a mock Browser. |
| OLD | NEW |