| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/setting_level_bubble_view.h" |
| 5 #include "chrome/browser/chromeos/volume_bubble.h" | 6 #include "chrome/browser/chromeos/volume_bubble.h" |
| 6 #include "chrome/test/base/in_process_browser_test.h" | 7 #include "chrome/test/base/in_process_browser_test.h" |
| 7 #include "chrome/browser/chromeos/setting_level_bubble_view.h" | 8 #include "ui/views/view.h" |
| 8 #include "views/view.h" | |
| 9 | 9 |
| 10 typedef InProcessBrowserTest VolumeBubbleTest; | 10 typedef InProcessBrowserTest VolumeBubbleTest; |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 | 13 |
| 14 IN_PROC_BROWSER_TEST_F(VolumeBubbleTest, GetInstanceAndShow) { | 14 IN_PROC_BROWSER_TEST_F(VolumeBubbleTest, GetInstanceAndShow) { |
| 15 VolumeBubble* bubble1 = VolumeBubble::GetInstance(); | 15 VolumeBubble* bubble1 = VolumeBubble::GetInstance(); |
| 16 VolumeBubble* bubble2 = VolumeBubble::GetInstance(); | 16 VolumeBubble* bubble2 = VolumeBubble::GetInstance(); |
| 17 ASSERT_EQ(bubble1, bubble2); | 17 ASSERT_EQ(bubble1, bubble2); |
| 18 | 18 |
| 19 bubble1->ShowBubble(20, true); | 19 bubble1->ShowBubble(20, true); |
| 20 EXPECT_TRUE(bubble1->view_ != NULL); | 20 EXPECT_TRUE(bubble1->view_ != NULL); |
| 21 EXPECT_TRUE(bubble1->view_->IsVisible()); | 21 EXPECT_TRUE(bubble1->view_->IsVisible()); |
| 22 views::View* saved_view = bubble1->view_; | 22 views::View* saved_view = bubble1->view_; |
| 23 bubble1->HideBubble(); | 23 bubble1->HideBubble(); |
| 24 EXPECT_EQ(NULL, bubble1->view_); | 24 EXPECT_EQ(NULL, bubble1->view_); |
| 25 bubble1->ShowBubble(20, true); | 25 bubble1->ShowBubble(20, true); |
| 26 EXPECT_TRUE(bubble1->view_ != NULL); | 26 EXPECT_TRUE(bubble1->view_ != NULL); |
| 27 EXPECT_NE(saved_view, bubble1->view_); | 27 EXPECT_NE(saved_view, bubble1->view_); |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace chromeos | 30 } // namespace chromeos |
| OLD | NEW |