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

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

Issue 8319008: aura: brightness and volume bubble. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: styles Created 9 years, 1 month 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/brightness_bubble.h"
7 #include "chrome/browser/chromeos/setting_level_bubble_view.h"
8 #include "chrome/test/base/in_process_browser_test.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "views/view.h"
11
12 typedef InProcessBrowserTest BrightnessBubbleTest;
13
14 namespace chromeos {
15
16 IN_PROC_BROWSER_TEST_F(BrightnessBubbleTest, UpdateWithoutShowing) {
17 BrightnessBubble* bubble = BrightnessBubble::GetInstance();
18 bubble->UpdateWithoutShowingBubble(20, false);
19 EXPECT_FALSE(bubble->view_ != NULL);
20 EXPECT_EQ(20, bubble->current_percent_);
21 bubble->UpdateWithoutShowingBubble(30, false);
22 EXPECT_FALSE(bubble->view_ != NULL);
23 EXPECT_EQ(20, bubble->current_percent_);
24 EXPECT_EQ(30, bubble->target_percent_);
25 bubble->UpdateWithoutShowingBubble(40, false);
26 EXPECT_FALSE(bubble->view_ != NULL);
27 EXPECT_EQ(40, bubble->target_percent_);
28 bubble->ShowBubble(50, true);
29 EXPECT_TRUE(bubble->view_->GetWidget()->IsVisible());
30 EXPECT_EQ(50, bubble->target_percent_);
31 MessageLoop::current()->RunAllPending();
32 }
33
34 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/setting_level_bubble.h » ('j') | chrome/browser/chromeos/setting_level_bubble.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698