| OLD | NEW |
| 1 // Copyright (c) 2010 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "chrome/browser/views/reload_button.h" | 6 #include "chrome/browser/ui/views/reload_button.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 class ReloadButtonTest : public testing::Test { | 9 class ReloadButtonTest : public testing::Test { |
| 10 public: | 10 public: |
| 11 ReloadButtonTest(); | 11 ReloadButtonTest(); |
| 12 | 12 |
| 13 void CheckState(bool enabled, | 13 void CheckState(bool enabled, |
| 14 ReloadButton::Mode intended_mode, | 14 ReloadButton::Mode intended_mode, |
| 15 ReloadButton::Mode visible_mode, | 15 ReloadButton::Mode visible_mode, |
| 16 bool double_click_timer_running, | 16 bool double_click_timer_running, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 reload_.ButtonPressed(&reload_, e); | 141 reload_.ButtonPressed(&reload_, e); |
| 142 reload_.ChangeMode(ReloadButton::MODE_STOP, false); | 142 reload_.ChangeMode(ReloadButton::MODE_STOP, false); |
| 143 set_mouse_hovered(true); | 143 set_mouse_hovered(true); |
| 144 reload_.ChangeMode(ReloadButton::MODE_RELOAD, false); | 144 reload_.ChangeMode(ReloadButton::MODE_RELOAD, false); |
| 145 | 145 |
| 146 // Now fire the stop-to-reload timer. This should reset the button. | 146 // Now fire the stop-to-reload timer. This should reset the button. |
| 147 loop_.RunAllPending(); | 147 loop_.RunAllPending(); |
| 148 CheckState(true, ReloadButton::MODE_RELOAD, ReloadButton::MODE_RELOAD, false, | 148 CheckState(true, ReloadButton::MODE_RELOAD, ReloadButton::MODE_RELOAD, false, |
| 149 false); | 149 false); |
| 150 } | 150 } |
| OLD | NEW |