aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_process_process__unittest.cc
blob: 302b9073639f197fad13cd0be74bba050630de2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- base/process/process_unittest.cc.orig	2021-07-19 18:45:05 UTC
+++ base/process/process_unittest.cc
@@ -138,7 +138,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) {
   // was spawned and a time recorded after it was spawned. However, since the
   // base::Time and process creation clocks don't match, tolerate some error.
   constexpr base::TimeDelta kTolerance =
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
       // On Linux, process creation time is relative to boot time which has a
       // 1-second resolution. Tolerate 1 second for the imprecise boot time and
       // 100 ms for the imprecise clock.
@@ -285,6 +285,7 @@ TEST_F(ProcessTest, WaitForExitOrEventWithEventSet) {
 }
 #endif  // OS_WIN
 
+#if !defined(OS_BSD)
 // Ensure that the priority of a process is restored correctly after
 // backgrounding and restoring.
 // Note: a platform may not be willing or able to lower the priority of
@@ -342,6 +343,7 @@ TEST_F(ProcessTest, SetProcessBackgroundedSelf) {
   int new_priority = process.GetPriority();
   EXPECT_EQ(old_priority, new_priority);
 }
+#endif
 
 // Consumers can use WaitForExitWithTimeout(base::TimeDelta(), nullptr) to check
 // whether the process is still running. This may not be safe because of the