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

Unified Diff: ios/chrome/browser/snapshots/snapshot_cache_unittest.mm

Issue 1148873002: [iOS] Fix ios_chrome_unittests on iPad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/snapshots/snapshot_cache_unittest.mm
diff --git a/ios/chrome/browser/snapshots/snapshot_cache_unittest.mm b/ios/chrome/browser/snapshots/snapshot_cache_unittest.mm
index 61b6310d926e84281934d2e46db04d7d83cf9098..c77a9ae94f56d7d2b24d2c93758101c6001a9901 100644
--- a/ios/chrome/browser/snapshots/snapshot_cache_unittest.mm
+++ b/ios/chrome/browser/snapshots/snapshot_cache_unittest.mm
@@ -377,7 +377,8 @@ TEST_F(SnapshotCacheTest, HandleLowMemory) {
[set addObject:secondPinnedID];
cache.pinnedIDs = set;
- [cache handleLowMemory];
+ if (!IsIPadIdiom())
+ [cache handleLowMemory];
BOOL expectedValue = YES;
if (IsIPadIdiom()) {
@@ -430,7 +431,9 @@ TEST_F(SnapshotCacheTest, CreateGreyCacheFromDisk) {
// Remove color images from in-memory cache.
SnapshotCache* cache = GetSnapshotCache();
- [cache handleLowMemory];
+
+ if (!IsIPadIdiom())
+ [cache handleLowMemory];
// Request the creation of a grey image cache for all images.
[cache createGreyCache:testSessions_];
@@ -471,7 +474,8 @@ TEST_F(SnapshotCacheTest, MostRecentGreyBlock) {
LoadColorImagesIntoCache(kNumImages, true);
// Make sure the color images are only on disk, to ensure the background
// thread is slow enough to queue up the requests.
- [cache handleLowMemory];
+ if (!IsIPadIdiom())
+ [cache handleLowMemory];
// Enable the grey image cache.
[cache createGreyCache:sessionIDs];
@@ -542,7 +546,8 @@ TEST_F(SnapshotCacheTest, SizeAndScalePreservation) {
NSString* const kSession = @"foo";
[cache setImage:image withSessionID:kSession];
FlushRunLoops(); // ensure the file is written to disk.
- [cache handleLowMemory];
+ if (!IsIPadIdiom())
+ [cache handleLowMemory];
// Retrive the image and have the callback verify the size and scale.
__block BOOL callbackComplete = NO;
@@ -578,7 +583,8 @@ TEST_F(SnapshotCacheTest, DeleteRetinaImages) {
NSString* const kSession = @"foo";
[cache setImage:image withSessionID:kSession];
FlushRunLoops(); // ensure the file is written to disk.
- [cache handleLowMemory];
+ if (!IsIPadIdiom())
+ [cache handleLowMemory];
// Verify the file was writted with @2x in the file name.
base::FilePath retinaFile = [SnapshotCache imagePathForSessionID:kSession];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698