| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/display/manager/chromeos/apply_content_protection_task.h" | 5 #include "ui/display/manager/chromeos/apply_content_protection_task.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "ui/display/fake_display_snapshot.h" | 13 #include "ui/display/fake_display_snapshot.h" |
| 14 #include "ui/display/manager/chromeos/display_layout_manager.h" | 14 #include "ui/display/manager/chromeos/display_layout_manager.h" |
| 15 #include "ui/display/manager/chromeos/test/action_logger_util.h" | 15 #include "ui/display/manager/chromeos/test/action_logger_util.h" |
| 16 #include "ui/display/manager/chromeos/test/test_display_layout_manager.h" | 16 #include "ui/display/manager/chromeos/test/test_display_layout_manager.h" |
| 17 #include "ui/display/manager/chromeos/test/test_native_display_delegate.h" | 17 #include "ui/display/manager/chromeos/test/test_native_display_delegate.h" |
| 18 | 18 |
| 19 namespace ui { | 19 namespace display { |
| 20 namespace test { | 20 namespace test { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 std::unique_ptr<DisplaySnapshot> CreateDisplaySnapshot( | 24 std::unique_ptr<DisplaySnapshot> CreateDisplaySnapshot( |
| 25 int64_t id, | 25 int64_t id, |
| 26 DisplayConnectionType type) { | 26 DisplayConnectionType type) { |
| 27 return display::FakeDisplaySnapshot::Builder() | 27 return FakeDisplaySnapshot::Builder() |
| 28 .SetId(id) | 28 .SetId(id) |
| 29 .SetNativeMode(gfx::Size(1024, 768)) | 29 .SetNativeMode(gfx::Size(1024, 768)) |
| 30 .SetType(type) | 30 .SetType(type) |
| 31 .Build(); | 31 .Build(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 class ApplyContentProtectionTaskTest : public testing::Test { | 36 class ApplyContentProtectionTaskTest : public testing::Test { |
| 37 public: | 37 public: |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 &layout_manager, &display_delegate_, request, | 172 &layout_manager, &display_delegate_, request, |
| 173 base::Bind(&ApplyContentProtectionTaskTest::ResponseCallback, | 173 base::Bind(&ApplyContentProtectionTaskTest::ResponseCallback, |
| 174 base::Unretained(this))); | 174 base::Unretained(this))); |
| 175 task.Run(); | 175 task.Run(); |
| 176 | 176 |
| 177 EXPECT_EQ(SUCCESS, response_); | 177 EXPECT_EQ(SUCCESS, response_); |
| 178 EXPECT_EQ(kNoActions, log_.GetActionsAndClear()); | 178 EXPECT_EQ(kNoActions, log_.GetActionsAndClear()); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace test | 181 } // namespace test |
| 182 } // namespace ui | 182 } // namespace display |
| OLD | NEW |