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

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

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 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
« no previous file with comments | « ui/events/platform/platform_event_source_stub.cc ('k') | ui/events/platform/platform_event_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cc305cb65cb6948389fa04a50f930792bdf0de97..ec721835e6c7ae796f324225c05f386bf4cc1175 100644
--- a/ui/events/platform/platform_event_source_unittest.cc
+++ b/ui/events/platform/platform_event_source_unittest.cc
@@ -65,9 +65,7 @@ class TestPlatformEventSource : public PlatformEventSource {
}
// PlatformEventSource:
- void StopCurrentEventStream() override {
- stop_stream_ = true;
- }
+ void StopCurrentEventStream() override { stop_stream_ = true; }
private:
bool stop_stream_;
@@ -79,8 +77,7 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
TestPlatformEventDispatcher(int id, std::vector<int>* list)
: id_(id),
list_(list),
- post_dispatch_action_(POST_DISPATCH_NONE),
- stop_stream_(false) {
+ post_dispatch_action_(POST_DISPATCH_NONE) {
PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
}
~TestPlatformEventDispatcher() override {
@@ -93,9 +90,7 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
protected:
// PlatformEventDispatcher:
- bool CanDispatchEvent(const PlatformEvent& event) override {
- return true;
- }
+ bool CanDispatchEvent(const PlatformEvent& event) override { return true; }
uint32_t DispatchEvent(const PlatformEvent& event) override {
list_->push_back(id_);
@@ -106,7 +101,6 @@ class TestPlatformEventDispatcher : public PlatformEventDispatcher {
int id_;
std::vector<int>* list_;
uint32_t post_dispatch_action_;
- bool stop_stream_;
DISALLOW_COPY_AND_ASSIGN(TestPlatformEventDispatcher);
};
@@ -145,9 +139,7 @@ class PlatformEventTest : public testing::Test {
protected:
// testing::Test:
- void SetUp() override {
- source_.reset(new TestPlatformEventSource());
- }
+ void SetUp() override { source_.reset(new TestPlatformEventSource()); }
private:
scoped_ptr<TestPlatformEventSource> source_;
@@ -581,9 +573,7 @@ class DestroyScopedHandleDispatcher : public TestPlatformEventDispatcher {
private:
// PlatformEventDispatcher:
- bool CanDispatchEvent(const PlatformEvent& event) override {
- return true;
- }
+ bool CanDispatchEvent(const PlatformEvent& event) override { return true; }
uint32_t DispatchEvent(const PlatformEvent& event) override {
handler_.reset();
@@ -611,9 +601,9 @@ class DestroyedNestedOverriddenDispatcherQuitsNestedLoopIteration
TestPlatformEventDispatcher* dispatcher) {
ScopedVector<PlatformEvent> events;
scoped_ptr<PlatformEvent> event(CreatePlatformEvent());
- events.push_back(event.release());
+ events.push_back(event.Pass());
event = CreatePlatformEvent();
- events.push_back(event.release());
+ events.push_back(event.Pass());
// Attempt to dispatch a couple of events. Dispatching the first event will
// have terminated the ScopedEventDispatcher object, which will terminate
« no previous file with comments | « ui/events/platform/platform_event_source_stub.cc ('k') | ui/events/platform/platform_event_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698