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

Unified Diff: ui/events/event_dispatcher_unittest.cc

Issue 519113002: Do not mutate ui::Event properties during nested event processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/event_dispatcher_unittest.cc
diff --git a/ui/events/event_dispatcher_unittest.cc b/ui/events/event_dispatcher_unittest.cc
index 248784a8870c67c552a5d425475a630acd08cd9c..480ff6485f9e0a1aa3958b1eebe4a39c87321fb5 100644
--- a/ui/events/event_dispatcher_unittest.cc
+++ b/ui/events/event_dispatcher_unittest.cc
@@ -125,8 +125,10 @@ class NonCancelableEvent : public Event {
virtual ~NonCancelableEvent() {}
- private:
- DISALLOW_COPY_AND_ASSIGN(NonCancelableEvent);
+ // Event:
+ virtual scoped_ptr<Event> Clone() const OVERRIDE {
+ return scoped_ptr<Event>(new NonCancelableEvent(*this));
+ }
};
// Destroys the dispatcher-delegate when it receives any event.

Powered by Google App Engine
This is Rietveld 408576698