| 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" | |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
| 13 | 12 |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 // Compares each pixel in the 1x representation of two images for testing. | 15 // Compares each pixel in the 1x representation of two images for testing. |
| 17 // TODO(pkotwicz): Compare pixels of all bitmaps contained within image. | 16 // TODO(pkotwicz): Compare pixels of all bitmaps contained within image. |
| 18 bool CompareTwoImages(const gfx::ImageSkia& image_a, | 17 bool CompareTwoImages(const gfx::ImageSkia& image_a, |
| 19 const gfx::ImageSkia& image_b, | 18 const gfx::ImageSkia& image_b, |
| 20 int log_level) { | 19 int log_level) { |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 icon = menu_icon.GetIconAndText(NULL); | 381 icon = menu_icon.GetIconAndText(NULL); |
| 383 EXPECT_TRUE(CompareImages(icon, wimax_connected_50_image_)); | 382 EXPECT_TRUE(CompareImages(icon, wimax_connected_50_image_)); |
| 384 | 383 |
| 385 // Set wifi1 to connected. Icon should now be wifi connected icon. | 384 // Set wifi1 to connected. Icon should now be wifi connected icon. |
| 386 SetConnected(wifi1); | 385 SetConnected(wifi1); |
| 387 icon = menu_icon.GetIconAndText(NULL); | 386 icon = menu_icon.GetIconAndText(NULL); |
| 388 EXPECT_TRUE(CompareImages(icon, wifi_connected_100_image_)); | 387 EXPECT_TRUE(CompareImages(icon, wifi_connected_100_image_)); |
| 389 } | 388 } |
| 390 | 389 |
| 391 } // namespace chromeos | 390 } // namespace chromeos |
| OLD | NEW |