OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/ui/snapshots_util.h" | 5 #import "ios/chrome/browser/snapshots/snapshots_util.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
11 #include "base/mac/foundation_util.h" | 11 #include "base/mac/foundation_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 NSString* filename = @"UIApplicationAutomaticSnapshotDefault-LandscapeRight"; | 48 NSString* filename = @"UIApplicationAutomaticSnapshotDefault-LandscapeRight"; |
49 NSString* regex = [NSString | 49 NSString* regex = [NSString |
50 stringWithFormat:@".*/%@/%@%@.png$", path, filename, scaleModifier]; | 50 stringWithFormat:@".*/%@/%@%@.png$", path, filename, scaleModifier]; |
51 EXPECT_FALSE(RegexMatchesOneSnapshotPath(@".*")); | 51 EXPECT_FALSE(RegexMatchesOneSnapshotPath(@".*")); |
52 EXPECT_FALSE(RegexMatchesOneSnapshotPath(@"foo")); | 52 EXPECT_FALSE(RegexMatchesOneSnapshotPath(@"foo")); |
53 EXPECT_TRUE(RegexMatchesOneSnapshotPath(@".*LandscapeRight.*")); | 53 EXPECT_TRUE(RegexMatchesOneSnapshotPath(@".*LandscapeRight.*")); |
54 EXPECT_TRUE(RegexMatchesOneSnapshotPath(regex)); | 54 EXPECT_TRUE(RegexMatchesOneSnapshotPath(regex)); |
55 } | 55 } |
56 | 56 |
57 } // anonymous namespace | 57 } // anonymous namespace |
OLD | NEW |