| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 base::FilePath test_data_directory; | 54 base::FilePath test_data_directory; |
| 55 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); | 55 PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); |
| 56 base::FilePath test_file = test_data_directory.AppendASCII(kPDFTestFile); | 56 base::FilePath test_file = test_data_directory.AppendASCII(kPDFTestFile); |
| 57 return test_file; | 57 return test_file; |
| 58 } | 58 } |
| 59 | 59 |
| 60 char* GetTestData() { | 60 char* GetTestData() { |
| 61 static std::string sTestFileData; | 61 static std::string sTestFileData; |
| 62 if (sTestFileData.empty()) { | 62 if (sTestFileData.empty()) { |
| 63 base::FilePath test_file = GetTestDataFileName(); | 63 base::FilePath test_file = GetTestDataFileName(); |
| 64 file_util::ReadFileToString(test_file, &sTestFileData); | 64 base::ReadFileToString(test_file, &sTestFileData); |
| 65 } | 65 } |
| 66 return &sTestFileData[0]; | 66 return &sTestFileData[0]; |
| 67 } | 67 } |
| 68 | 68 |
| 69 MATCHER_P(StringValueEq, expected, "StringValue") { | 69 MATCHER_P(StringValueEq, expected, "StringValue") { |
| 70 if (expected->Equals(&arg)) | 70 if (expected->Equals(&arg)) |
| 71 return true; | 71 return true; |
| 72 std::string expected_string, arg_string; | 72 std::string expected_string, arg_string; |
| 73 expected->GetAsString(&expected_string); | 73 expected->GetAsString(&expected_string); |
| 74 arg.GetAsString(&arg_string); | 74 arg.GetAsString(&arg_string); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 std::vector<WebUIMessageHandler*> handlers; | 341 std::vector<WebUIMessageHandler*> handlers; |
| 342 delegate_->GetWebUIMessageHandlers(&handlers); | 342 delegate_->GetWebUIMessageHandlers(&handlers); |
| 343 delegate_.reset(); | 343 delegate_.reset(); |
| 344 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); | 344 EXPECT_THAT(mock_flow_handler_.get(), NotNull()); |
| 345 } | 345 } |
| 346 | 346 |
| 347 // Testing for ExternalWebDialogUI needs a mock WebContents and mock | 347 // Testing for ExternalWebDialogUI needs a mock WebContents and mock |
| 348 // CloudPrintWebDialogDelegate (attached to the mock web_contents). | 348 // CloudPrintWebDialogDelegate (attached to the mock web_contents). |
| 349 | 349 |
| 350 // Testing for PrintDialogCloud needs a mock Browser. | 350 // Testing for PrintDialogCloud needs a mock Browser. |
| OLD | NEW |