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

Side by Side Diff: ios/chrome/browser/snapshots/snapshot_cache_unittest.mm

Issue 2426823002: Removed use of IsRunningOnIOS8OrLater from snapshots code. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "ios/chrome/browser/snapshots/snapshot_cache.h" 5 #import "ios/chrome/browser/snapshots/snapshot_cache.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (i == 0) 342 if (i == 0)
343 EXPECT_TRUE(base::PathExists(path)); 343 EXPECT_TRUE(base::PathExists(path));
344 else 344 else
345 EXPECT_FALSE(base::PathExists(path)); 345 EXPECT_FALSE(base::PathExists(path));
346 } 346 }
347 } 347 }
348 348
349 // Loads the color images into the cache, and pins two of them. Ensures that 349 // Loads the color images into the cache, and pins two of them. Ensures that
350 // only the two pinned IDs remain in memory after a call to -handleLowMemory. 350 // only the two pinned IDs remain in memory after a call to -handleLowMemory.
351 TEST_F(SnapshotCacheTest, HandleLowMemory) { 351 TEST_F(SnapshotCacheTest, HandleLowMemory) {
352 // TODO(droger): This test fails on iPad iOS8 device: http://crbug.com/455209 352 // TODO(droger): This test fails on iPad iOS8 device: http://crbug.com/455209
sdefresne 2016/10/19 18:22:27 I've unassigned the bug so that we investigate whe
pkl (ping after 24h if needed) 2016/10/19 20:35:03 Updated this comment and crbug.
353 #if !TARGET_IPHONE_SIMULATOR 353 #if !TARGET_IPHONE_SIMULATOR
354 if (IsIPadIdiom() && base::ios::IsRunningOnIOS8OrLater()) { 354 if (IsIPadIdiom()) {
355 LOG(WARNING) << "Test disabled on iPad iOS8 device."; 355 LOG(WARNING) << "Test disabled on iPad device.";
356 return; 356 return;
357 } 357 }
358 #endif 358 #endif
359 359
360 LoadAllColorImagesIntoCache(true); 360 LoadAllColorImagesIntoCache(true);
361 361
362 SnapshotCache* cache = GetSnapshotCache(); 362 SnapshotCache* cache = GetSnapshotCache();
363 363
364 NSString* firstPinnedID = [testSessions_ objectAtIndex:4]; 364 NSString* firstPinnedID = [testSessions_ objectAtIndex:4];
365 NSString* secondPinnedID = [testSessions_ objectAtIndex:6]; 365 NSString* secondPinnedID = [testSessions_ objectAtIndex:6];
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 EXPECT_TRUE(base::PathExists(retinaFile)); 582 EXPECT_TRUE(base::PathExists(retinaFile));
583 583
584 // Delete the image. 584 // Delete the image.
585 [cache removeImageWithSessionID:kSession]; 585 [cache removeImageWithSessionID:kSession];
586 FlushRunLoops(); // ensure the file is removed. 586 FlushRunLoops(); // ensure the file is removed.
587 587
588 EXPECT_FALSE(base::PathExists(retinaFile)); 588 EXPECT_FALSE(base::PathExists(retinaFile));
589 } 589 }
590 590
591 } // namespace 591 } // namespace
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/snapshots/snapshots_util.mm » ('j') | ios/chrome/browser/snapshots/snapshots_util.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698