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

Side by Side Diff: base/process/process_metrics_unittest.cc

Issue 2814303003: Disable invalid assertion in GetSystemMemoryInfo test on iOS. (Closed)
Patch Set: tmp Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/process/process_metrics.h" 5 #include "base/process/process_metrics.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <sstream> 10 #include <sstream>
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 #if defined(OS_LINUX) || defined(OS_ANDROID) 411 #if defined(OS_LINUX) || defined(OS_ANDROID)
412 EXPECT_GT(info.buffers, 0); 412 EXPECT_GT(info.buffers, 0);
413 EXPECT_GT(info.cached, 0); 413 EXPECT_GT(info.cached, 0);
414 EXPECT_GT(info.active_anon, 0); 414 EXPECT_GT(info.active_anon, 0);
415 EXPECT_GT(info.inactive_anon, 0); 415 EXPECT_GT(info.inactive_anon, 0);
416 EXPECT_GT(info.active_file, 0); 416 EXPECT_GT(info.active_file, 0);
417 EXPECT_GT(info.inactive_file, 0); 417 EXPECT_GT(info.inactive_file, 0);
418 #endif // defined(OS_LINUX) || defined(OS_ANDROID) 418 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
419 419
420 // All the values should be less than the total amount of memory. 420 // All the values should be less than the total amount of memory.
421 #if !defined(OS_WIN) 421 #if !defined(OS_WIN) && !defined(OS_IOS)
422 // TODO(crbug.com/711450): re-enable the following assertion on iOS.
422 EXPECT_LT(info.free, info.total); 423 EXPECT_LT(info.free, info.total);
423 #endif 424 #endif
424 #if defined(OS_LINUX) || defined(OS_ANDROID) 425 #if defined(OS_LINUX) || defined(OS_ANDROID)
425 EXPECT_LT(info.buffers, info.total); 426 EXPECT_LT(info.buffers, info.total);
426 EXPECT_LT(info.cached, info.total); 427 EXPECT_LT(info.cached, info.total);
427 EXPECT_LT(info.active_anon, info.total); 428 EXPECT_LT(info.active_anon, info.total);
428 EXPECT_LT(info.inactive_anon, info.total); 429 EXPECT_LT(info.inactive_anon, info.total);
429 EXPECT_LT(info.active_file, info.total); 430 EXPECT_LT(info.active_file, info.total);
430 EXPECT_LT(info.inactive_file, info.total); 431 EXPECT_LT(info.inactive_file, info.total);
431 #endif // defined(OS_LINUX) || defined(OS_ANDROID) 432 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 563
563 std::unique_ptr<ProcessMetrics> metrics( 564 std::unique_ptr<ProcessMetrics> metrics(
564 ProcessMetrics::CreateProcessMetrics(spawn_child.process.Handle())); 565 ProcessMetrics::CreateProcessMetrics(spawn_child.process.Handle()));
565 EXPECT_EQ(0, metrics->GetOpenFdCount()); 566 EXPECT_EQ(0, metrics->GetOpenFdCount());
566 ASSERT_TRUE(spawn_child.process.Terminate(0, true)); 567 ASSERT_TRUE(spawn_child.process.Terminate(0, true));
567 } 568 }
568 #endif // defined(OS_LINUX) 569 #endif // defined(OS_LINUX)
569 570
570 } // namespace debug 571 } // namespace debug
571 } // namespace base 572 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698