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

Side by Side Diff: base/timer_unittest.cc

Issue 269104: Mark some disabled tests as flaky to increase test coverage. (Closed)
Patch Set: fixes Created 11 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 unified diff | Download patch
« no previous file with comments | « base/condition_variable_unittest.cc ('k') | chrome/browser/session_history_uitest.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/scoped_ptr.h" 6 #include "base/scoped_ptr.h"
7 #include "base/task.h" 7 #include "base/task.h"
8 #include "base/timer.h" 8 #include "base/timer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 RunTest_DelayTimer_NoCall(MessageLoop::TYPE_UI); 311 RunTest_DelayTimer_NoCall(MessageLoop::TYPE_UI);
312 RunTest_DelayTimer_NoCall(MessageLoop::TYPE_IO); 312 RunTest_DelayTimer_NoCall(MessageLoop::TYPE_IO);
313 } 313 }
314 314
315 TEST(TimerTest, DelayTimer_OneCall) { 315 TEST(TimerTest, DelayTimer_OneCall) {
316 RunTest_DelayTimer_OneCall(MessageLoop::TYPE_DEFAULT); 316 RunTest_DelayTimer_OneCall(MessageLoop::TYPE_DEFAULT);
317 RunTest_DelayTimer_OneCall(MessageLoop::TYPE_UI); 317 RunTest_DelayTimer_OneCall(MessageLoop::TYPE_UI);
318 RunTest_DelayTimer_OneCall(MessageLoop::TYPE_IO); 318 RunTest_DelayTimer_OneCall(MessageLoop::TYPE_IO);
319 } 319 }
320 320
321 // Disabled because it's flaky on the buildbot. Bug not filed because this 321 // It's flaky on the buildbot, http://crbug.com/25038.
322 // kind of test is difficult to make not-flaky on buildbots. 322 TEST(TimerTest, FLAKY_DelayTimer_Reset) {
323 TEST(TimerTest, DISABLED_DelayTimer_Reset) {
324 RunTest_DelayTimer_Reset(MessageLoop::TYPE_DEFAULT); 323 RunTest_DelayTimer_Reset(MessageLoop::TYPE_DEFAULT);
325 RunTest_DelayTimer_Reset(MessageLoop::TYPE_UI); 324 RunTest_DelayTimer_Reset(MessageLoop::TYPE_UI);
326 RunTest_DelayTimer_Reset(MessageLoop::TYPE_IO); 325 RunTest_DelayTimer_Reset(MessageLoop::TYPE_IO);
327 } 326 }
328 327
329 TEST(TimerTest, DelayTimer_Deleted) { 328 TEST(TimerTest, DelayTimer_Deleted) {
330 RunTest_DelayTimer_Deleted(MessageLoop::TYPE_DEFAULT); 329 RunTest_DelayTimer_Deleted(MessageLoop::TYPE_DEFAULT);
331 RunTest_DelayTimer_Deleted(MessageLoop::TYPE_UI); 330 RunTest_DelayTimer_Deleted(MessageLoop::TYPE_UI);
332 RunTest_DelayTimer_Deleted(MessageLoop::TYPE_IO); 331 RunTest_DelayTimer_Deleted(MessageLoop::TYPE_IO);
333 } 332 }
(...skipping 11 matching lines...) Expand all
345 OneShotTimerTester d(&did_run); 344 OneShotTimerTester d(&did_run);
346 { 345 {
347 MessageLoop loop(MessageLoop::TYPE_DEFAULT); 346 MessageLoop loop(MessageLoop::TYPE_DEFAULT);
348 a.Start(); 347 a.Start();
349 b.Start(); 348 b.Start();
350 } // MessageLoop destructs by falling out of scope. 349 } // MessageLoop destructs by falling out of scope.
351 } // OneShotTimers destruct. SHOULD NOT CRASH, of course. 350 } // OneShotTimers destruct. SHOULD NOT CRASH, of course.
352 351
353 EXPECT_EQ(false, did_run); 352 EXPECT_EQ(false, did_run);
354 } 353 }
OLDNEW
« no previous file with comments | « base/condition_variable_unittest.cc ('k') | chrome/browser/session_history_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698