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

Unified Diff: ui/events/platform/platform_event_source_unittest.cc

Issue 666673005: Explicitly coerce PostDispatchAction to uint32_t in DispatchEvent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: sigh. Windows. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/platform/platform_event_source_unittest.cc
diff --git a/ui/events/platform/platform_event_source_unittest.cc b/ui/events/platform/platform_event_source_unittest.cc
index cc3496086d64ac95c432ee03542d5a3fb4e721cb..54e218f3cf078bcfd40dfab3e4adcb4f11629cfc 100644
--- a/ui/events/platform/platform_event_source_unittest.cc
+++ b/ui/events/platform/platform_event_source_unittest.cc
@@ -79,7 +79,7 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
TestPlatformEventDispatcher(int id, std::vector<int>* list)
: id_(id),
list_(list),
- post_dispatch_action_(POST_DISPATCH_NONE),
+ post_dispatch_action_(kPostDispatchNone),
stop_stream_(false) {
PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
}
@@ -206,7 +206,7 @@ TEST_F(PlatformEventTest, DispatcherConsumesEventToStopDispatch) {
EXPECT_EQ(23, list_dispatcher[1]);
list_dispatcher.clear();
- first.set_post_dispatch_action(POST_DISPATCH_STOP_PROPAGATION);
+ first.set_post_dispatch_action(kPostDispatchStopPropagation);
event = CreatePlatformEvent();
source()->Dispatch(*event);
ASSERT_EQ(1u, list_dispatcher.size());
@@ -296,7 +296,7 @@ TEST_F(PlatformEventTest, OverriddenDispatcherInvokeDefaultDispatcher) {
source()->RemovePlatformEventDispatcher(&overriding_dispatcher);
scoped_ptr<ScopedEventDispatcher> handle =
source()->OverrideDispatcher(&overriding_dispatcher);
- overriding_dispatcher.set_post_dispatch_action(POST_DISPATCH_PERFORM_DEFAULT);
+ overriding_dispatcher.set_post_dispatch_action(kPostDispatchPerformDefault);
scoped_ptr<PlatformEvent> event(CreatePlatformEvent());
source()->Dispatch(*event);
@@ -319,7 +319,7 @@ TEST_F(PlatformEventTest, OverriddenDispatcherInvokeDefaultDispatcher) {
EXPECT_EQ(50, list[1]);
list.clear();
- second_overriding.set_post_dispatch_action(POST_DISPATCH_PERFORM_DEFAULT);
+ second_overriding.set_post_dispatch_action(kPostDispatchPerformDefault);
source()->Dispatch(*event);
// First the observer, then the second overriding dispatcher, then the default
// dispatcher.
@@ -719,7 +719,7 @@ class ConsecutiveOverriddenDispatcherInTheSameMessageLoopIteration
list->clear();
second_overriding.SetScopedHandle(second_override_handle.Pass());
- second_overriding.set_post_dispatch_action(POST_DISPATCH_NONE);
+ second_overriding.set_post_dispatch_action(kPostDispatchNone);
base::RunLoop run_loop;
second_overriding.set_callback(run_loop.QuitClosure());
base::MessageLoopForUI* loop = base::MessageLoopForUI::current();

Powered by Google App Engine
This is Rietveld 408576698