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

Side by Side Diff: chrome/browser/private_working_set_snapshot_win_unittest.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 "chrome/browser/private_working_set_snapshot.h" 5 #include "chrome/browser/private_working_set_snapshot.h"
6 6
7 #include <stddef.h>
8
7 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 using PrivateWorkingSetSnapshotWinTest = testing::Test; 12 using PrivateWorkingSetSnapshotWinTest = testing::Test;
11 13
12 TEST_F(PrivateWorkingSetSnapshotWinTest, FindPidSelfTest) { 14 TEST_F(PrivateWorkingSetSnapshotWinTest, FindPidSelfTest) {
13 // The Pdh APIs are supported on Windows XP and above, but the "Working Set - 15 // The Pdh APIs are supported on Windows XP and above, but the "Working Set -
14 // Private" counter that PrivateWorkingSetSnapshot depends on is not defined 16 // Private" counter that PrivateWorkingSetSnapshot depends on is not defined
15 // until Windows Vista and is not reliable until Windows 7. Early-out to avoid 17 // until Windows Vista and is not reliable until Windows 7. Early-out to avoid
16 // test failure. 18 // test failure.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 size_t private_ws2 = private_ws_snapshot.GetPrivateWorkingSet(pid); 57 size_t private_ws2 = private_ws_snapshot.GetPrivateWorkingSet(pid);
56 EXPECT_EQ(private_ws, private_ws2) << "GetPrivateWorkingSet should be " 58 EXPECT_EQ(private_ws, private_ws2) << "GetPrivateWorkingSet should be "
57 "consistent until the next call to " 59 "consistent until the next call to "
58 "Sample()"; 60 "Sample()";
59 61
60 private_ws_snapshot.Sample(); 62 private_ws_snapshot.Sample();
61 size_t private_ws3 = private_ws_snapshot.GetPrivateWorkingSet(pid); 63 size_t private_ws3 = private_ws_snapshot.GetPrivateWorkingSet(pid);
62 EXPECT_GT(private_ws3, private_ws2 + alloc_size / 2) 64 EXPECT_GT(private_ws3, private_ws2 + alloc_size / 2)
63 << "GetPrivateWorkingSet should increase as we allocate more memory"; 65 << "GetPrivateWorkingSet should increase as we allocate more memory";
64 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/private_working_set_snapshot_win.cc ('k') | chrome/browser/process_info_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698