| 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "chrome/browser/chromeos/setting_level_bubble.h" | 6 #include "chrome/browser/chromeos/setting_level_bubble.h" |
| 7 #include "chrome/browser/chromeos/setting_level_bubble_view.h" | 7 #include "chrome/browser/chromeos/setting_level_bubble_view.h" |
| 8 #include "chrome/test/base/in_process_browser_test.h" | 8 #include "chrome/test/base/in_process_browser_test.h" |
| 9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
| 10 #include "ui/views/controls/progress_bar.h" | 10 #include "ui/views/controls/progress_bar.h" |
| 11 #include "views/view.h" | 11 #include "ui/views/view.h" |
| 12 | 12 |
| 13 | 13 |
| 14 class SettingLevelBubbleTest : public InProcessBrowserTest { | 14 class SettingLevelBubbleTest : public InProcessBrowserTest { |
| 15 public: | 15 public: |
| 16 SettingLevelBubbleTest() { | 16 SettingLevelBubbleTest() { |
| 17 up_icon_.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); | 17 up_icon_.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); |
| 18 down_icon_.setConfig(SkBitmap::kARGB_8888_Config, 5, 5); | 18 down_icon_.setConfig(SkBitmap::kARGB_8888_Config, 5, 5); |
| 19 mute_icon_.setConfig(SkBitmap::kARGB_8888_Config, 1, 1); | 19 mute_icon_.setConfig(SkBitmap::kARGB_8888_Config, 1, 1); |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 EXPECT_TRUE(bubble.view_ != NULL); | 80 EXPECT_TRUE(bubble.view_ != NULL); |
| 81 EXPECT_TRUE(bubble.view_->GetWidget()->IsVisible()); | 81 EXPECT_TRUE(bubble.view_->GetWidget()->IsVisible()); |
| 82 | 82 |
| 83 // Update to 0 percent and close. | 83 // Update to 0 percent and close. |
| 84 bubble.UpdateWithoutShowingBubble(0, true); | 84 bubble.UpdateWithoutShowingBubble(0, true); |
| 85 bubble.OnWidgetClosing(bubble.view_->GetWidget()); | 85 bubble.OnWidgetClosing(bubble.view_->GetWidget()); |
| 86 EXPECT_EQ(0, bubble.current_percent_); | 86 EXPECT_EQ(0, bubble.current_percent_); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace chromeos | 89 } // namespace chromeos |
| OLD | NEW |