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

Side by Side Diff: ui/message_center/views/custom_notification_view_unittest.cc

Issue 2729533002: Adjust behavior of control buttons of notifications. (Closed)
Patch Set: Add unimplemented method to TestContentViewDelegate Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 int keyboard_event_count_ = 0; 82 int keyboard_event_count_ = 0;
83 83
84 DISALLOW_COPY_AND_ASSIGN(TestCustomView); 84 DISALLOW_COPY_AND_ASSIGN(TestCustomView);
85 }; 85 };
86 86
87 class TestContentViewDelegate : public CustomNotificationContentViewDelegate { 87 class TestContentViewDelegate : public CustomNotificationContentViewDelegate {
88 public: 88 public:
89 bool IsCloseButtonFocused() const override { return false; } 89 bool IsCloseButtonFocused() const override { return false; }
90 void RequestFocusOnCloseButton() override {} 90 void RequestFocusOnCloseButton() override {}
91 bool IsPinned() const override { return false; } 91 bool IsPinned() const override { return false; }
92 void UpdateControlButtonsVisibility() override {}
92 }; 93 };
93 94
94 class TestNotificationDelegate : public NotificationDelegate { 95 class TestNotificationDelegate : public NotificationDelegate {
95 public: 96 public:
96 TestNotificationDelegate() {} 97 TestNotificationDelegate() {}
97 98
98 // NotificateDelegate 99 // NotificateDelegate
99 std::unique_ptr<CustomContent> CreateCustomContent() override { 100 std::unique_ptr<CustomContent> CreateCustomContent() override {
100 return base::MakeUnique<CustomContent>( 101 return base::MakeUnique<CustomContent>(
101 base::MakeUnique<TestCustomView>(), 102 base::MakeUnique<TestCustomView>(),
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 text_input_client.set_text_input_type(ui::TEXT_INPUT_TYPE_TEXT); 369 text_input_client.set_text_input_type(ui::TEXT_INPUT_TYPE_TEXT);
369 370
370 EXPECT_FALSE(controller()->IsRemoved(notification_id)); 371 EXPECT_FALSE(controller()->IsRemoved(notification_id));
371 PerformKeyEvents(ui::VKEY_BACK); 372 PerformKeyEvents(ui::VKEY_BACK);
372 EXPECT_FALSE(controller()->IsRemoved(notification_id)); 373 EXPECT_FALSE(controller()->IsRemoved(notification_id));
373 374
374 input_method->SetFocusedTextInputClient(nullptr); 375 input_method->SetFocusedTextInputClient(nullptr);
375 } 376 }
376 377
377 } // namespace message_center 378 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/custom_notification_view.cc ('k') | ui/message_center/views/message_center_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698