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

Side by Side Diff: dbus/signal_sender_verification_unittest.cc

Issue 11374002: disable flaky dbus_unittests SignalSenderVerificationTest.TestOwnerChange (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/histogram_samples.h" 9 #include "base/metrics/histogram_samples.h"
10 #include "base/metrics/statistics_recorder.h" 10 #include "base/metrics/statistics_recorder.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Sleep to have message delivered to the client via the D-Bus service. 150 // Sleep to have message delivered to the client via the D-Bus service.
151 base::PlatformThread::Sleep(TestTimeouts::action_timeout()); 151 base::PlatformThread::Sleep(TestTimeouts::action_timeout());
152 152
153 scoped_ptr<base::HistogramSamples> samples2( 153 scoped_ptr<base::HistogramSamples> samples2(
154 reject_signal_histogram->SnapshotSamples()); 154 reject_signal_histogram->SnapshotSamples());
155 155
156 ASSERT_EQ("", test_signal_string_); 156 ASSERT_EQ("", test_signal_string_);
157 EXPECT_EQ(samples1->TotalCount() + 1, samples2->TotalCount()); 157 EXPECT_EQ(samples1->TotalCount() + 1, samples2->TotalCount());
158 } 158 }
159 159
160 TEST_F(SignalSenderVerificationTest, TestOwnerChanged) { 160 TEST_F(SignalSenderVerificationTest, DISABLED_TestOwnerChanged) {
161 const char kMessage[] = "hello, world"; 161 const char kMessage[] = "hello, world";
162 162
163 // Send the test signal from the exported object. 163 // Send the test signal from the exported object.
164 test_service_->SendTestSignal(kMessage); 164 test_service_->SendTestSignal(kMessage);
165 // Receive the signal with the object proxy. The signal is handled in 165 // Receive the signal with the object proxy. The signal is handled in
166 // SignalSenderVerificationTest::OnTestSignal() in the main thread. 166 // SignalSenderVerificationTest::OnTestSignal() in the main thread.
167 WaitForTestSignal(); 167 WaitForTestSignal();
168 ASSERT_EQ(kMessage, test_signal_string_); 168 ASSERT_EQ(kMessage, test_signal_string_);
169 169
170 // Release and aquire the name ownership. 170 // Release and aquire the name ownership.
171 test_service_->ShutdownAndBlock(); 171 test_service_->ShutdownAndBlock();
172 test_service2_->RequestOwnership(); 172 test_service2_->RequestOwnership();
173 173
174 // Now the second service owns the name. 174 // Now the second service owns the name.
175 const char kNewMessage[] = "hello, new world"; 175 const char kNewMessage[] = "hello, new world";
176 176
177 test_service2_->SendTestSignal(kNewMessage); 177 test_service2_->SendTestSignal(kNewMessage);
178 WaitForTestSignal(); 178 WaitForTestSignal();
179 ASSERT_EQ(kNewMessage, test_signal_string_); 179 ASSERT_EQ(kNewMessage, test_signal_string_);
180 } 180 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698