OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/message_loop.h" |
| 6 #include "chrome/browser/chromeos/volume_bubble.h" |
| 7 #include "chrome/test/base/in_process_browser_test.h" |
| 8 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "views/widget/widget.h" |
| 10 |
| 11 typedef InProcessBrowserTest VolumeBubbleTest; |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 IN_PROC_BROWSER_TEST_F(VolumeBubbleTest, GetInstanceAndShow) { |
| 16 VolumeBubble* bubble1 = VolumeBubble::GetInstance(); |
| 17 VolumeBubble* bubble2 = VolumeBubble::GetInstance(); |
| 18 ASSERT_EQ(bubble1, bubble2); |
| 19 |
| 20 bubble1->ShowBubble(20, true); |
| 21 EXPECT_TRUE(bubble1->widget_->IsVisible()); |
| 22 EXPECT_TRUE(bubble1->widget_ != NULL); |
| 23 views::Widget* saved_widget = bubble1->widget_; |
| 24 bubble1->HideBubble(); |
| 25 EXPECT_TRUE(bubble1->widget_ == NULL); |
| 26 bubble1->ShowBubble(20, true); |
| 27 EXPECT_TRUE(bubble1->widget_ != NULL); |
| 28 EXPECT_FALSE(bubble1->widget_ == saved_widget); |
| 29 } |
| 30 |
| 31 } // namespace chromeos |
OLD | NEW |