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

Side by Side Diff: ui/base/resource/resource_bundle_unittest.cc

Issue 480693002: Use a qualified path for ui_resources.h grit includes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 | « ui/base/cursor/cursors_aura.cc ('k') | ui/message_center/DEPS » ('j') | 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 "ui/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/big_endian.h" 8 #include "base/big_endian.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/ref_counted_memory.h" 13 #include "base/memory/ref_counted_memory.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "grit/ui_resources.h"
17 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 18 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "ui/base/layout.h" 19 #include "ui/base/layout.h"
21 #include "ui/base/resource/data_pack.h" 20 #include "ui/base/resource/data_pack.h"
22 #include "ui/gfx/codec/png_codec.h" 21 #include "ui/gfx/codec/png_codec.h"
23 #include "ui/gfx/image/image_skia.h" 22 #include "ui/gfx/image/image_skia.h"
23 #include "ui/resources/grit/ui_resources.h"
24
24 #if defined(OS_WIN) 25 #if defined(OS_WIN)
25 #include "ui/gfx/win/dpi.h" 26 #include "ui/gfx/win/dpi.h"
26 #endif 27 #endif
27 28
28 using ::testing::_; 29 using ::testing::_;
29 using ::testing::Between; 30 using ::testing::Between;
30 using ::testing::Property; 31 using ::testing::Property;
31 using ::testing::Return; 32 using ::testing::Return;
32 using ::testing::ReturnArg; 33 using ::testing::ReturnArg;
33 34
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); 621 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE);
621 622
622 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); 623 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3);
623 EXPECT_EQ(1u, image_skia->image_reps().size()); 624 EXPECT_EQ(1u, image_skia->image_reps().size());
624 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); 625 EXPECT_TRUE(image_skia->image_reps()[0].unscaled());
625 EXPECT_EQ(ui::SCALE_FACTOR_100P, 626 EXPECT_EQ(ui::SCALE_FACTOR_100P,
626 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); 627 GetSupportedScaleFactor(image_skia->image_reps()[0].scale()));
627 } 628 }
628 629
629 } // namespace ui 630 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/cursor/cursors_aura.cc ('k') | ui/message_center/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698