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

Unified Diff: ui/views/test/test_widget_observer.h

Issue 11639012: Add tests to verify accelerators properly work on constrained window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/test/test_widget_observer.h
diff --git a/ui/views/test/test_widget_observer.h b/ui/views/test/test_widget_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4bed16f0757b9fe87a18f2dbe2e14281243e4de3
--- /dev/null
+++ b/ui/views/test/test_widget_observer.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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 UI_VIEWS_TEST_TEST_WIDGET_OBSERVER_H_
+#define UI_VIEWS_TEST_TEST_WIDGET_OBSERVER_H_
+
+#include <stddef.h>
sky 2012/12/21 15:46:01 Is this include really needed?
mazda 2013/01/07 22:41:14 This file cannot be compiled without this because
+
+#include "base/compiler_specific.h"
+#include "ui/views/widget/widget_observer.h"
+
+namespace views {
+namespace test {
+
+// A Widget observer class used in the tests below to observe bubbles closing.
+class TestWidgetObserver : public WidgetObserver {
+ public:
+ explicit TestWidgetObserver(Widget* widget);
+ virtual ~TestWidgetObserver();
+
+ bool widget_closed() const { return widget_ == NULL; }
+
+ private:
+ // WidgetObserver overrides:
+ virtual void OnWidgetClosing(Widget* widget) OVERRIDE;
+
+ Widget* widget_;
+};
sky 2012/12/21 15:46:01 DISALLOW_...
mazda 2013/01/07 22:41:14 Done.
+
+} // namespace test
+} // namespace views
+
+#endif // UI_VIEWS_TEST_TEST_WIDGET_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698