| Index: chrome/browser/chromeos/volume_bubble_browsertest.cc
|
| diff --git a/chrome/browser/chromeos/volume_bubble_browsertest.cc b/chrome/browser/chromeos/volume_bubble_browsertest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..13fce28b7badf86f1ceb157a5cd698e0a5e633be
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/volume_bubble_browsertest.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/message_loop.h"
|
| +#include "chrome/browser/chromeos/volume_bubble.h"
|
| +#include "chrome/test/base/in_process_browser_test.h"
|
| +#include "third_party/skia/include/core/SkBitmap.h"
|
| +#include "views/widget/widget.h"
|
| +
|
| +typedef InProcessBrowserTest VolumeBubbleTest;
|
| +
|
| +namespace chromeos {
|
| +
|
| +IN_PROC_BROWSER_TEST_F(VolumeBubbleTest, GetInstanceAndShow) {
|
| + VolumeBubble* bubble1 = VolumeBubble::GetInstance();
|
| + VolumeBubble* bubble2 = VolumeBubble::GetInstance();
|
| + ASSERT_EQ(bubble1, bubble2);
|
| +
|
| + bubble1->ShowBubble(20, true);
|
| + EXPECT_TRUE(bubble1->widget_->IsVisible());
|
| + EXPECT_TRUE(bubble1->widget_ != NULL);
|
| + views::Widget* saved_widget = bubble1->widget_;
|
| + bubble1->HideBubble();
|
| + EXPECT_TRUE(bubble1->widget_ == NULL);
|
| + bubble1->ShowBubble(20, true);
|
| + EXPECT_TRUE(bubble1->widget_ != NULL);
|
| + EXPECT_FALSE(bubble1->widget_ == saved_widget);
|
| +}
|
| +
|
| +} // namespace chromeos
|
|
|