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 "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" | |
msw
2011/10/26 18:51:42
What is the SkBitmap include used for?
alicet1
2011/10/27 00:34:51
removed.
| |
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); | |
msw
2011/10/26 18:51:42
Use EXPECT_EQ and EXPECT_NE for several checks in
alicet1
2011/10/27 00:34:51
Done. see response in setting_level_bubble_browser
| |
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 | |
OLD | NEW |