OLD | NEW |
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/message_loop.h" | 7 #include "base/message_loop/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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 TEST_F(SignalSenderVerificationTest, TestSignalAccepted) { | 179 TEST_F(SignalSenderVerificationTest, TestSignalAccepted) { |
180 const char kMessage[] = "hello, world"; | 180 const char kMessage[] = "hello, world"; |
181 // Send the test signal from the exported object. | 181 // Send the test signal from the exported object. |
182 test_service_->SendTestSignal(kMessage); | 182 test_service_->SendTestSignal(kMessage); |
183 // Receive the signal with the object proxy. The signal is handled in | 183 // Receive the signal with the object proxy. The signal is handled in |
184 // SignalSenderVerificationTest::OnTestSignal() in the main thread. | 184 // SignalSenderVerificationTest::OnTestSignal() in the main thread. |
185 WaitForTestSignal(); | 185 WaitForTestSignal(); |
186 ASSERT_EQ(kMessage, test_signal_string_); | 186 ASSERT_EQ(kMessage, test_signal_string_); |
187 } | 187 } |
188 | 188 |
189 TEST_F(SignalSenderVerificationTest, TestSignalRejected) { | 189 // Disabled, http://crbug.com/407063 . |
| 190 TEST_F(SignalSenderVerificationTest, DISABLED_TestSignalRejected) { |
190 // To make sure the histogram instance is created. | 191 // To make sure the histogram instance is created. |
191 UMA_HISTOGRAM_COUNTS("DBus.RejectedSignalCount", 0); | 192 UMA_HISTOGRAM_COUNTS("DBus.RejectedSignalCount", 0); |
192 base::HistogramBase* reject_signal_histogram = | 193 base::HistogramBase* reject_signal_histogram = |
193 base::StatisticsRecorder::FindHistogram("DBus.RejectedSignalCount"); | 194 base::StatisticsRecorder::FindHistogram("DBus.RejectedSignalCount"); |
194 scoped_ptr<base::HistogramSamples> samples1( | 195 scoped_ptr<base::HistogramSamples> samples1( |
195 reject_signal_histogram->SnapshotSamples()); | 196 reject_signal_histogram->SnapshotSamples()); |
196 | 197 |
197 const char kNewMessage[] = "hello, new world"; | 198 const char kNewMessage[] = "hello, new world"; |
198 test_service2_->SendTestSignal(kNewMessage); | 199 test_service2_->SendTestSignal(kNewMessage); |
199 | 200 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 373 |
373 // Now the second service owns the name. | 374 // Now the second service owns the name. |
374 const char kNewMessage[] = "hello, new world"; | 375 const char kNewMessage[] = "hello, new world"; |
375 | 376 |
376 test_service2_->SendTestSignal(kNewMessage); | 377 test_service2_->SendTestSignal(kNewMessage); |
377 WaitForTestSignal(); | 378 WaitForTestSignal(); |
378 ASSERT_EQ(kNewMessage, test_signal_string_); | 379 ASSERT_EQ(kNewMessage, test_signal_string_); |
379 } | 380 } |
380 | 381 |
381 } // namespace dbus | 382 } // namespace dbus |
OLD | NEW |