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

Side by Side Diff: chrome/browser/win/private_working_set_snapshot_unittest.cc

Issue 2098713003: Moved a bunch of win-specific files to the new win folder in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « chrome/browser/win/private_working_set_snapshot.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/win/private_working_set_snapshot.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using PrivateWorkingSetSnapshotWinTest = testing::Test; 12 using PrivateWorkingSetSnapshotWinTest = testing::Test;
13 13
14 TEST_F(PrivateWorkingSetSnapshotWinTest, FindPidSelfTest) { 14 TEST_F(PrivateWorkingSetSnapshotWinTest, FindPidSelfTest) {
15 // 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 -
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 size_t private_ws2 = private_ws_snapshot.GetPrivateWorkingSet(pid); 57 size_t private_ws2 = private_ws_snapshot.GetPrivateWorkingSet(pid);
58 EXPECT_EQ(private_ws, private_ws2) << "GetPrivateWorkingSet should be " 58 EXPECT_EQ(private_ws, private_ws2) << "GetPrivateWorkingSet should be "
59 "consistent until the next call to " 59 "consistent until the next call to "
60 "Sample()"; 60 "Sample()";
61 61
62 private_ws_snapshot.Sample(); 62 private_ws_snapshot.Sample();
63 size_t private_ws3 = private_ws_snapshot.GetPrivateWorkingSet(pid); 63 size_t private_ws3 = private_ws_snapshot.GetPrivateWorkingSet(pid);
64 EXPECT_GT(private_ws3, private_ws2 + alloc_size / 2) 64 EXPECT_GT(private_ws3, private_ws2 + alloc_size / 2)
65 << "GetPrivateWorkingSet should increase as we allocate more memory"; 65 << "GetPrivateWorkingSet should increase as we allocate more memory";
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/win/private_working_set_snapshot.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698