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

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

Issue 2668583005: Not Remove Non-Closable Arc Popup When Close Button is Pressed (Closed)
Patch Set: Created 3 years, 10 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool IsCloseButtonFocused() const override { return false; } 86 bool IsCloseButtonFocused() const override { return false; }
87 void RequestFocusOnCloseButton() override {} 87 void RequestFocusOnCloseButton() override {}
88 bool IsPinned() const override { return false; } 88 bool IsPinned() const override { return false; }
89 }; 89 };
90 90
91 class TestNotificationDelegate : public NotificationDelegate { 91 class TestNotificationDelegate : public NotificationDelegate {
92 public: 92 public:
93 TestNotificationDelegate() {} 93 TestNotificationDelegate() {}
94 94
95 // NotificateDelegate 95 // NotificateDelegate
96 std::unique_ptr<CustomContent> CreateCustomContent() override { 96 std::unique_ptr<CustomContent> CreateCustomContent(
97 MessageView* message_view) override {
97 return base::MakeUnique<CustomContent>( 98 return base::MakeUnique<CustomContent>(
98 base::MakeUnique<TestCustomView>(), 99 base::MakeUnique<TestCustomView>(),
99 base::MakeUnique<TestContentViewDelegate>()); 100 base::MakeUnique<TestContentViewDelegate>());
100 } 101 }
101 102
102 private: 103 private:
103 ~TestNotificationDelegate() override {} 104 ~TestNotificationDelegate() override {}
104 105
105 DISALLOW_COPY_AND_ASSIGN(TestNotificationDelegate); 106 DISALLOW_COPY_AND_ASSIGN(TestNotificationDelegate);
106 }; 107 };
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 notification_view()->OnGestureEvent(event_scroll500.get()); 304 notification_view()->OnGestureEvent(event_scroll500.get());
304 EXPECT_FALSE(controller()->IsRemoved(notification_id)); 305 EXPECT_FALSE(controller()->IsRemoved(notification_id));
305 EXPECT_LT(-500.f, GetNotificationScrollAmount()); 306 EXPECT_LT(-500.f, GetNotificationScrollAmount());
306 notification_view()->OnGestureEvent(event_end.get()); 307 notification_view()->OnGestureEvent(event_end.get());
307 EXPECT_FALSE(controller()->IsRemoved(notification_id)); 308 EXPECT_FALSE(controller()->IsRemoved(notification_id));
308 } 309 }
309 310
310 #endif // defined(OS_CHROMEOS) 311 #endif // defined(OS_CHROMEOS)
311 312
312 } // namespace message_center 313 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698