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 "chrome/browser/chromeos/volume_bubble.h" |
| 6 #include "chrome/test/base/in_process_browser_test.h" |
| 7 #include "chrome/browser/chromeos/setting_level_bubble_view.h" |
| 8 #include "views/view.h" |
| 9 |
| 10 typedef InProcessBrowserTest VolumeBubbleTest; |
| 11 |
| 12 namespace chromeos { |
| 13 |
| 14 IN_PROC_BROWSER_TEST_F(VolumeBubbleTest, GetInstanceAndShow) { |
| 15 VolumeBubble* bubble1 = VolumeBubble::GetInstance(); |
| 16 VolumeBubble* bubble2 = VolumeBubble::GetInstance(); |
| 17 ASSERT_EQ(bubble1, bubble2); |
| 18 |
| 19 bubble1->ShowBubble(20, true); |
| 20 EXPECT_TRUE(bubble1->view_ != NULL); |
| 21 EXPECT_TRUE(bubble1->view_->IsVisible()); |
| 22 views::View* saved_view = bubble1->view_; |
| 23 bubble1->HideBubble(); |
| 24 EXPECT_EQ(NULL, bubble1->view_); |
| 25 bubble1->ShowBubble(20, true); |
| 26 EXPECT_TRUE(bubble1->view_ != NULL); |
| 27 EXPECT_NE(saved_view, bubble1->view_); |
| 28 } |
| 29 |
| 30 } // namespace chromeos |
OLD | NEW |