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 25 matching lines...) Expand all Loading... |
36 using testing::AtLeast; | 36 using testing::AtLeast; |
37 using testing::Eq; | 37 using testing::Eq; |
38 using testing::HasSubstr; | 38 using testing::HasSubstr; |
39 using testing::IsNull; | 39 using testing::IsNull; |
40 using testing::NotNull; | 40 using testing::NotNull; |
41 using testing::Return; | 41 using testing::Return; |
42 using testing::StrEq; | 42 using testing::StrEq; |
43 using testing::_; | 43 using testing::_; |
44 using ui::ExternalWebDialogUI; | 44 using ui::ExternalWebDialogUI; |
45 | 45 |
46 static const char* const kPDFTestFile = "printing/cloud_print_unittest.pdf"; | 46 const char kPDFTestFile[] = "printing/cloud_print_unittest.pdf"; |
47 static const char* const kEmptyPDFTestFile = | 47 const char kMockJobTitle[] = "Mock Job Title"; |
48 "printing/cloud_print_emptytest.pdf"; | 48 const char kMockPrintTicket[] = "Resolution=300"; |
49 static const char* const kMockJobTitle = "Mock Job Title"; | |
50 static const char* const kMockPrintTicket = "Resolution=300"; | |
51 | 49 |
52 | 50 |
53 base::FilePath GetTestDataFileName() { | 51 base::FilePath GetTestDataFileName() { |
54 base::FilePath test_data_directory; | 52 base::FilePath test_data_directory; |
55 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); | 53 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); |
56 base::FilePath test_file = test_data_directory.AppendASCII(kPDFTestFile); | 54 base::FilePath test_file = test_data_directory.AppendASCII(kPDFTestFile); |
57 return test_file; | 55 return test_file; |
58 } | 56 } |
59 | 57 |
60 char* GetTestData() { | 58 char* GetTestData() { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 std::vector<WebUIMessageHandler*> handlers; | 339 std::vector<WebUIMessageHandler*> handlers; |
342 delegate_->GetWebUIMessageHandlers(&handlers); | 340 delegate_->GetWebUIMessageHandlers(&handlers); |
343 delegate_.reset(); | 341 delegate_.reset(); |
344 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); | 342 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); |
345 } | 343 } |
346 | 344 |
347 // Testing for ExternalWebDialogUI needs a mock WebContents and mock | 345 // Testing for ExternalWebDialogUI needs a mock WebContents and mock |
348 // CloudPrintWebDialogDelegate (attached to the mock web_contents). | 346 // CloudPrintWebDialogDelegate (attached to the mock web_contents). |
349 | 347 |
350 // Testing for PrintDialogCloud needs a mock Browser. | 348 // Testing for PrintDialogCloud needs a mock Browser. |
OLD | NEW |