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

Unified Diff: ui/base/resource/resource_bundle_unittest.cc

Issue 2969123002: Add deduplication logic to .pak files (Closed)
Patch Set: sizeof() Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/resource/data_pack_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_unittest.cc
diff --git a/ui/base/resource/resource_bundle_unittest.cc b/ui/base/resource/resource_bundle_unittest.cc
index df11f1afddb4988f0706448d28cf1805e1572e43..363a0e9d03d459b3a777b7be5ac2c94c06f081c7 100644
--- a/ui/base/resource/resource_bundle_unittest.cc
+++ b/ui/base/resource/resource_bundle_unittest.cc
@@ -23,6 +23,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/layout.h"
#include "ui/base/resource/data_pack.h"
+#include "ui/base/resource/data_pack_literal.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/image/image_skia.h"
@@ -38,14 +39,6 @@ using ::testing::Return;
using ::testing::ReturnArg;
namespace ui {
-
-extern const char kSamplePakContents[];
-extern const size_t kSamplePakSize;
-extern const char kSamplePakContents2x[];
-extern const size_t kSamplePakSize2x;
-extern const char kEmptyPakContents[];
-extern const size_t kEmptyPakSize;
-
namespace {
const unsigned char kPngMagic[8] = { 0x89, 'P', 'N', 'G', 13, 10, 26, 10 };
@@ -416,8 +409,8 @@ TEST_F(ResourceBundleImageTest, GetRawDataResource) {
dir_path().Append(FILE_PATH_LITERAL("sample_2x.pak"));
// Dump contents into the pak files.
- ASSERT_EQ(base::WriteFile(data_path, kSamplePakContents,
- kSamplePakSize), static_cast<int>(kSamplePakSize));
+ ASSERT_EQ(base::WriteFile(data_path, kSamplePakContentsV4, kSamplePakSizeV4),
+ static_cast<int>(kSamplePakSizeV4));
ASSERT_EQ(base::WriteFile(data_2x_path, kSamplePakContents2x,
kSamplePakSize2x), static_cast<int>(kSamplePakSize2x));
« no previous file with comments | « ui/base/resource/data_pack_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698