Return backed up TemplateURL on default search change
[chromium-blink-merge.git] / chrome / browser / chromeos / volume_bubble_browsertest.cc
blob3c3d371b9213c53e61eb770d1d0d87c6339e5291
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.
5 #include "chrome/browser/chromeos/setting_level_bubble_view.h"
6 #include "chrome/browser/chromeos/volume_bubble.h"
7 #include "chrome/test/base/in_process_browser_test.h"
8 #include "ui/views/view.h"
10 typedef InProcessBrowserTest VolumeBubbleTest;
12 namespace chromeos {
14 IN_PROC_BROWSER_TEST_F(VolumeBubbleTest, GetInstanceAndShow) {
15 VolumeBubble* bubble1 = VolumeBubble::GetInstance();
16 VolumeBubble* bubble2 = VolumeBubble::GetInstance();
17 ASSERT_EQ(bubble1, bubble2);
19 bubble1->ShowBubble(20, true);
20 EXPECT_TRUE(bubble1->view_ != NULL);
21 EXPECT_TRUE(bubble1->view_->visible());
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_);
30 } // namespace chromeos