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

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

Issue 537063002: Eliminate silently letting errors pass on pak loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ios finally works Created 6 years, 3 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
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 7e7567b2fbe53ee03074cf2b1e28c6dfa1ddb4dd..91384762cee9f306126c151fbb9521d50d4ab057 100644
--- a/ui/base/resource/resource_bundle_unittest.cc
+++ b/ui/base/resource/resource_bundle_unittest.cc
@@ -186,7 +186,7 @@ TEST_F(ResourceBundleTest, DelegateGetPathForResourcePack) {
Property(&base::FilePath::value, pack_path.value()),
pack_scale_factor))
.Times(1)
- .WillOnce(Return(pack_path));
+ .WillOnce(Return(base::FilePath()));
tony 2014/09/04 22:55:48 Why did this change?
Avi (use Gerrit) 2014/09/04 23:02:51 This unit test is testing that the delegate will g
resource_bundle->AddDataPackFromPath(pack_path, pack_scale_factor);
}
@@ -414,7 +414,6 @@ class ResourceBundleImageTest : public ResourceBundleTest {
};
// Verify that we don't crash when trying to load a resource that is not found.
-// In some cases, we fail to mmap resources.pak, but try to keep going anyway.
TEST_F(ResourceBundleImageTest, LoadDataResourceBytes) {
base::FilePath data_path = dir_path().Append(FILE_PATH_LITERAL("sample.pak"));
@@ -429,13 +428,6 @@ TEST_F(ResourceBundleImageTest, LoadDataResourceBytes) {
const int kUnfoundResourceId = 10000;
EXPECT_EQ(NULL, resource_bundle->LoadDataResourceBytes(
kUnfoundResourceId));
-
- // Give a .pak file that doesn't exist so we will fail to load it.
- resource_bundle->AddDataPackFromPath(
- base::FilePath(FILE_PATH_LITERAL("non-existant-file.pak")),
- ui::SCALE_FACTOR_NONE);
- EXPECT_EQ(NULL, resource_bundle->LoadDataResourceBytes(
- kUnfoundResourceId));
}
TEST_F(ResourceBundleImageTest, GetRawDataResource) {

Powered by Google App Engine
This is Rietveld 408576698