OLD | NEW |
---|---|
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 Loading... | |
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 } |
OLD | NEW |