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

Side by Side Diff: ios/chrome/browser/metrics/previous_session_info_unittest.mm

Issue 1984223002: Separates PreviousSessionInfo testing interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "ios/chrome/browser/metrics/previous_session_info.h" 5 #include "ios/chrome/browser/metrics/previous_session_info.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "components/version_info/version_info.h" 8 #include "components/version_info/version_info.h"
9 #include "ios/chrome/browser/metrics/previous_session_info_private.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/gtest_mac.h" 11 #include "testing/gtest_mac.h"
11 12
12 namespace { 13 namespace {
13 14
14 // Key in the UserDefaults for a boolean value keeping track of memory warnings. 15 // Key in the UserDefaults for a boolean value keeping track of memory warnings.
15 NSString* const kDidSeeMemoryWarningShortlyBeforeTerminating = 16 NSString* const kDidSeeMemoryWarningShortlyBeforeTerminating =
16 previous_session_info_constants:: 17 previous_session_info_constants::
17 kDidSeeMemoryWarningShortlyBeforeTerminating; 18 kDidSeeMemoryWarningShortlyBeforeTerminating;
18 19
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]); 181 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]);
181 182
182 // Call the memory warning flag resetter. 183 // Call the memory warning flag resetter.
183 [[PreviousSessionInfo sharedInstance] resetMemoryWarningFlag]; 184 [[PreviousSessionInfo sharedInstance] resetMemoryWarningFlag];
184 185
185 EXPECT_FALSE( 186 EXPECT_FALSE(
186 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]); 187 [defaults boolForKey:kDidSeeMemoryWarningShortlyBeforeTerminating]);
187 } 188 }
188 189
189 } // namespace 190 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698