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 "content/browser/renderer_host/pepper/browser_ppapi_host_test.h" | 5 #include "content/browser/renderer_host/pepper/browser_ppapi_host_test.h" |
6 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" | 6 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" |
7 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" | 7 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/host/host_message_context.h" | 9 #include "ppapi/host/host_message_context.h" |
10 #include "ppapi/host/ppapi_host.h" | 10 #include "ppapi/host/ppapi_host.h" |
11 #include "ppapi/proxy/ppapi_messages.h" | 11 #include "ppapi/proxy/ppapi_messages.h" |
12 #include "ppapi/proxy/resource_message_params.h" | 12 #include "ppapi/proxy/resource_message_params.h" |
13 #include "ppapi/proxy/resource_message_test_sink.h" | 13 #include "ppapi/proxy/resource_message_test_sink.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Mock implementation of |PepperPrintSettingsManager| for test purposes. | 20 // Mock implementation of |PepperPrintSettingsManager| for test purposes. |
21 class MockPepperPrintSettingsManager | 21 class MockPepperPrintSettingsManager |
22 : public PepperPrintSettingsManager { | 22 : public PepperPrintSettingsManager { |
23 public: | 23 public: |
24 MockPepperPrintSettingsManager(const PP_PrintSettings_Dev& settings); | 24 explicit MockPepperPrintSettingsManager(const PP_PrintSettings_Dev& settings); |
25 virtual ~MockPepperPrintSettingsManager() {} | 25 virtual ~MockPepperPrintSettingsManager() {} |
26 | 26 |
27 // PepperPrintSettingsManager implementation. | 27 // PepperPrintSettingsManager implementation. |
28 virtual void GetDefaultPrintSettings( | 28 virtual void GetDefaultPrintSettings( |
29 PepperPrintSettingsManager::Callback callback) OVERRIDE; | 29 PepperPrintSettingsManager::Callback callback) OVERRIDE; |
30 private: | 30 private: |
31 PP_PrintSettings_Dev settings_; | 31 PP_PrintSettings_Dev settings_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(MockPepperPrintSettingsManager); | 33 DISALLOW_COPY_AND_ASSIGN(MockPepperPrintSettingsManager); |
34 }; | 34 }; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 actual_settings.paper_size)); | 119 actual_settings.paper_size)); |
120 EXPECT_EQ(expected_settings.dpi, actual_settings.dpi); | 120 EXPECT_EQ(expected_settings.dpi, actual_settings.dpi); |
121 EXPECT_EQ(expected_settings.orientation, actual_settings.orientation); | 121 EXPECT_EQ(expected_settings.orientation, actual_settings.orientation); |
122 EXPECT_EQ(expected_settings.print_scaling_option, | 122 EXPECT_EQ(expected_settings.print_scaling_option, |
123 actual_settings.print_scaling_option); | 123 actual_settings.print_scaling_option); |
124 EXPECT_EQ(expected_settings.grayscale, actual_settings.grayscale); | 124 EXPECT_EQ(expected_settings.grayscale, actual_settings.grayscale); |
125 EXPECT_EQ(expected_settings.format, actual_settings.format); | 125 EXPECT_EQ(expected_settings.format, actual_settings.format); |
126 } | 126 } |
127 | 127 |
128 } // namespace content | 128 } // namespace content |
OLD | NEW |