Index: chrome/browser/chromeos/brightness_bubble_browsertest.cc |
diff --git a/chrome/browser/chromeos/brightness_bubble_browsertest.cc b/chrome/browser/chromeos/brightness_bubble_browsertest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e30960be8e7c89ae41d9b135a56d7aa350db6b5b |
--- /dev/null |
+++ b/chrome/browser/chromeos/brightness_bubble_browsertest.cc |
@@ -0,0 +1,23 @@ |
+// 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. |
+ |
+#include "base/message_loop.h" |
+#include "chrome/browser/chromeos/brightness_bubble.h" |
+#include "chrome/test/base/in_process_browser_test.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
+#include "views/widget/widget.h" |
+ |
+typedef InProcessBrowserTest BrightnessBubbleTest; |
+ |
+namespace chromeos { |
+ |
+IN_PROC_BROWSER_TEST_F(BrightnessBubbleTest, UpdateWithoutShowing) { |
+ BrightnessBubble* bubble = BrightnessBubble::GetInstance(); |
+ bubble->UpdateWithoutShowingBubble(20, true); |
+ EXPECT_FALSE(bubble->widget_->IsVisible()); |
+ bubble->ShowBubble(50, true); |
+ EXPECT_TRUE(bubble->widget_->IsVisible()); |
+} |
+ |
+} // namespace chromeos |