Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: chrome/browser/chromeos/volume_bubble_browsertest.cc

Issue 8319008: aura: brightness and volume bubble. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698