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/chromeos/status/network_menu_icon.h" | 5 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/cros/cros_library.h" | 7 #include "chrome/browser/chromeos/cros/cros_library.h" |
8 #include "chrome/test/base/testing_browser_process.h" | 8 #include "chrome/test/base/testing_browser_process.h" |
9 #include "grit/theme_resources.h" | 9 #include "grit/theme_resources.h" |
| 10 #include "grit/theme_resources_standard.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 // Compares each pixel in the 1x representation of two images for testing. | 16 // Compares each pixel in the 1x representation of two images for testing. |
16 // TODO(pkotwicz): Compare pixels of all bitmaps contained within image. | 17 // TODO(pkotwicz): Compare pixels of all bitmaps contained within image. |
17 bool CompareTwoImages(const gfx::ImageSkia& image_a, | 18 bool CompareTwoImages(const gfx::ImageSkia& image_a, |
18 const gfx::ImageSkia& image_b, | 19 const gfx::ImageSkia& image_b, |
19 int log_level) { | 20 int log_level) { |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 icon = menu_icon.GetIconAndText(NULL); | 368 icon = menu_icon.GetIconAndText(NULL); |
368 EXPECT_TRUE(CompareImages(icon, wimax_connected_50_image_)); | 369 EXPECT_TRUE(CompareImages(icon, wimax_connected_50_image_)); |
369 | 370 |
370 // Set wifi1 to connected. Icon should now be wifi connected icon. | 371 // Set wifi1 to connected. Icon should now be wifi connected icon. |
371 SetConnected(wifi1, true); | 372 SetConnected(wifi1, true); |
372 icon = menu_icon.GetIconAndText(NULL); | 373 icon = menu_icon.GetIconAndText(NULL); |
373 EXPECT_TRUE(CompareImages(icon, wifi_connected_100_image_)); | 374 EXPECT_TRUE(CompareImages(icon, wifi_connected_100_image_)); |
374 } | 375 } |
375 | 376 |
376 } // namespace chromeos | 377 } // namespace chromeos |
OLD | NEW |