Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: ui/display/chromeos/query_content_protection_task_unittest.cc

Issue 2407153008: Delete TestDisplaySnapshot and update tests. (Closed)
Patch Set: Rebase and cleanup. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/chromeos/query_content_protection_task.h" 5 #include "ui/display/chromeos/query_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/chromeos/display_layout_manager.h" 13 #include "ui/display/chromeos/display_layout_manager.h"
14 #include "ui/display/chromeos/test/action_logger_util.h" 14 #include "ui/display/chromeos/test/action_logger_util.h"
15 #include "ui/display/chromeos/test/test_display_layout_manager.h" 15 #include "ui/display/chromeos/test/test_display_layout_manager.h"
16 #include "ui/display/chromeos/test/test_display_snapshot.h"
17 #include "ui/display/chromeos/test/test_native_display_delegate.h" 16 #include "ui/display/chromeos/test/test_native_display_delegate.h"
17 #include "ui/display/fake_display_snapshot.h"
18 18
19 namespace ui { 19 namespace ui {
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 std::unique_ptr<TestDisplaySnapshot> display(new TestDisplaySnapshot()); 27 return display::FakeDisplaySnapshot::Builder()
28 display->set_display_id(id); 28 .SetId(id)
29 display->set_type(type); 29 .SetNativeMode(gfx::Size(1024, 768))
30 30 .SetType(type)
31 return std::move(display); 31 .Build();
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 class QueryContentProtectionTaskTest : public testing::Test { 36 class QueryContentProtectionTaskTest : public testing::Test {
37 public: 37 public:
38 QueryContentProtectionTaskTest() 38 QueryContentProtectionTaskTest()
39 : display_delegate_(&log_), has_response_(false) {} 39 : display_delegate_(&log_), has_response_(false) {}
40 ~QueryContentProtectionTaskTest() override {} 40 ~QueryContentProtectionTaskTest() override {}
41 41
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 EXPECT_TRUE(response_.success); 188 EXPECT_TRUE(response_.success);
189 EXPECT_EQ(static_cast<uint32_t>(DISPLAY_CONNECTION_TYPE_HDMI | 189 EXPECT_EQ(static_cast<uint32_t>(DISPLAY_CONNECTION_TYPE_HDMI |
190 DISPLAY_CONNECTION_TYPE_DVI), 190 DISPLAY_CONNECTION_TYPE_DVI),
191 response_.link_mask); 191 response_.link_mask);
192 EXPECT_EQ(0u, response_.enabled); 192 EXPECT_EQ(0u, response_.enabled);
193 EXPECT_EQ(CONTENT_PROTECTION_METHOD_HDCP, response_.unfulfilled); 193 EXPECT_EQ(CONTENT_PROTECTION_METHOD_HDCP, response_.unfulfilled);
194 } 194 }
195 195
196 } // namespace test 196 } // namespace test
197 } // namespace ui 197 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/display_configurator_unittest.cc ('k') | ui/display/chromeos/test/test_display_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698