OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/status_icons/status_tray_win.h" | 5 #include "chrome/browser/ui/views/status_icons/status_tray_win.h" |
6 | 6 |
7 #include <commctrl.h> | 7 #include <commctrl.h> |
| 8 #include <stddef.h> |
8 | 9 |
| 10 #include "base/macros.h" |
9 #include "chrome/browser/status_icons/status_icon_menu_model.h" | 11 #include "chrome/browser/status_icons/status_icon_menu_model.h" |
10 #include "chrome/browser/status_icons/status_icon_observer.h" | 12 #include "chrome/browser/status_icons/status_icon_observer.h" |
11 #include "chrome/browser/ui/views/status_icons/status_icon_win.h" | 13 #include "chrome/browser/ui/views/status_icons/status_icon_win.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
14 #include "ui/gfx/image/image_unittest_util.h" | 16 #include "ui/gfx/image/image_unittest_util.h" |
15 | 17 |
16 namespace { | 18 namespace { |
17 | 19 |
18 class FakeStatusTrayStateChangerProxy : public StatusTrayStateChangerProxy { | 20 class FakeStatusTrayStateChangerProxy : public StatusTrayStateChangerProxy { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 129 |
128 StatusIconWin* icon = CreateStatusIcon(&tray); | 130 StatusIconWin* icon = CreateStatusIcon(&tray); |
129 | 131 |
130 icon->ForceVisible(); | 132 icon->ForceVisible(); |
131 // |proxy| is owned by |tray|, and |tray| lives to the end of the scope, | 133 // |proxy| is owned by |tray|, and |tray| lives to the end of the scope, |
132 // so calling methods on |proxy| is safe. | 134 // so calling methods on |proxy| is safe. |
133 EXPECT_TRUE(proxy->enqueue_called()); | 135 EXPECT_TRUE(proxy->enqueue_called()); |
134 EXPECT_EQ(proxy->window(), icon->window()); | 136 EXPECT_EQ(proxy->window(), icon->window()); |
135 EXPECT_EQ(proxy->icon_id(), icon->icon_id()); | 137 EXPECT_EQ(proxy->icon_id(), icon->icon_id()); |
136 } | 138 } |
OLD | NEW |