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

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 8533015: Increase timer in render_widget_host_unittest to reduce flakiness in valgrind (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test expectations Created 9 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 | tools/valgrind/gtest_exclude/unit_tests.gtest_linux.txt » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "base/timer.h" 8 #include "base/timer.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/renderer_host/backing_store.h" 10 #include "content/browser/renderer_host/backing_store.h"
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 // Start with a short timeout, then stop it. 742 // Start with a short timeout, then stop it.
743 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); 743 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10));
744 host_->StopHangMonitorTimeout(); 744 host_->StopHangMonitorTimeout();
745 745
746 // Start it again to ensure it still works. 746 // Start it again to ensure it still works.
747 EXPECT_FALSE(host_->unresponsive_timer_fired()); 747 EXPECT_FALSE(host_->unresponsive_timer_fired());
748 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); 748 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10));
749 749
750 // Wait long enough for first timeout and see if it fired. 750 // Wait long enough for first timeout and see if it fired.
751 MessageLoop::current()->PostDelayedTask(FROM_HERE, 751 MessageLoop::current()->PostDelayedTask(FROM_HERE,
752 new MessageLoop::QuitTask(), 10); 752 new MessageLoop::QuitTask(), 40);
jam 2011/11/15 00:14:03 this is really really flaky, independent of the ti
Charlie Reis 2011/11/15 00:23:05 The point of this test is to test a timer. If you
jam 2011/11/15 00:37:58 Excuse the naive question, but if the point of the
Charlie Reis 2011/11/15 00:45:05 Hopefully Timer is already tested there. The Rend
Paweł Hajdan Jr. 2011/11/15 09:01:31 Thanks for adding me. I don't know the code tested
753 MessageLoop::current()->Run(); 753 MessageLoop::current()->Run();
754 EXPECT_TRUE(host_->unresponsive_timer_fired()); 754 EXPECT_TRUE(host_->unresponsive_timer_fired());
755 } 755 }
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/gtest_exclude/unit_tests.gtest_linux.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698