OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "remoting/host/linux/certificate_watcher.h" | 5 #include "remoting/host/linux/certificate_watcher.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 16 #include "base/single_thread_task_runner.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 namespace remoting { | 19 namespace remoting { |
19 | 20 |
20 const char kCertFileName[] = "cert9.db"; | 21 const char kCertFileName[] = "cert9.db"; |
21 const char kKeyFileName[] = "key4.db"; | 22 const char kKeyFileName[] = "key4.db"; |
22 const char kPKCSFileName[] = "pkcs11.txt"; | 23 const char kPKCSFileName[] = "pkcs11.txt"; |
23 const char kOtherFileName[] = "testfile.txt"; | 24 const char kOtherFileName[] = "testfile.txt"; |
24 | 25 |
25 const int kMessageLoopWaitMsecs = 150; | 26 const int kMessageLoopWaitMsecs = 150; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // NSS DB contents. | 164 // NSS DB contents. |
164 EXPECT_EQ(0, restart_count_); | 165 EXPECT_EQ(0, restart_count_); |
165 Start(); | 166 Start(); |
166 EXPECT_EQ(0, restart_count_); | 167 EXPECT_EQ(0, restart_count_); |
167 TouchFile(kOtherFileName); | 168 TouchFile(kOtherFileName); |
168 RunAndWait(); | 169 RunAndWait(); |
169 EXPECT_EQ(0, restart_count_); | 170 EXPECT_EQ(0, restart_count_); |
170 } | 171 } |
171 | 172 |
172 } // namespace remoting | 173 } // namespace remoting |
OLD | NEW |