Index: chrome/browser/ui/panels/test_panel_mouse_watcher.h |
diff --git a/chrome/browser/ui/panels/test_panel_mouse_watcher.h b/chrome/browser/ui/panels/test_panel_mouse_watcher.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ae5d07b11edb09a41a4fe3500af4bbc6eed14e3e |
--- /dev/null |
+++ b/chrome/browser/ui/panels/test_panel_mouse_watcher.h |
@@ -0,0 +1,29 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_ |
+#define CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_ |
+#pragma once |
+ |
+#include "base/basictypes.h" |
+#include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
+ |
+// Test mouse watcher for simulating mouse movements in tests. |
+class TestPanelMouseWatcher : public PanelMouseWatcher { |
+ public: |
+ TestPanelMouseWatcher() : started_(false) { } |
+ ~TestPanelMouseWatcher() { |
jianli
2011/11/30 19:27:01
virtual.
jennb
2011/11/30 19:55:12
Done and created separate .cc file to make clang h
|
+ EXPECT_FALSE(IsActive()); |
+ } |
+ private: |
+ virtual void Start() OVERRIDE { started_ = true; } |
+ virtual void Stop() OVERRIDE { started_ = false; } |
+ virtual bool IsActive() const OVERRIDE { |
+ return started_; |
+ } |
+ bool started_; |
+ DISALLOW_COPY_AND_ASSIGN(TestPanelMouseWatcher); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_ |