Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: chrome/browser/chromeos/status/network_menu_icon_unittest.cc

Issue 10539086: Add high-DPI resources for networks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/status/network_menu_icon.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_menu_icon.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698