OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include "base/win/scoped_handle.h" | 7 #include "base/win/scoped_handle.h" |
8 #include "sandbox/win/src/win_utils.h" | 8 #include "sandbox/win/src/win_utils.h" |
9 #include "sandbox/win/tests/common/test_utils.h" | 9 #include "sandbox/win/tests/common/test_utils.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 pipe_name = L"\\??\\pipe"; | 94 pipe_name = L"\\??\\pipe"; |
95 EXPECT_FALSE(IsPipe(pipe_name)); | 95 EXPECT_FALSE(IsPipe(pipe_name)); |
96 | 96 |
97 pipe_name = L"\\??\\_pipe_\\mypipe"; | 97 pipe_name = L"\\??\\_pipe_\\mypipe"; |
98 EXPECT_FALSE(IsPipe(pipe_name)); | 98 EXPECT_FALSE(IsPipe(pipe_name)); |
99 | 99 |
100 pipe_name = L"\\??\\ABCD\\mypipe"; | 100 pipe_name = L"\\??\\ABCD\\mypipe"; |
101 EXPECT_FALSE(IsPipe(pipe_name)); | 101 EXPECT_FALSE(IsPipe(pipe_name)); |
102 | 102 |
103 pipe_name = L"/??/pipe/mypipe"; | 103 |
| 104 // Written as two strings to prevent trigraph '?' '?' '/'. |
| 105 pipe_name = L"/?" L"?/pipe/mypipe"; |
104 EXPECT_FALSE(IsPipe(pipe_name)); | 106 EXPECT_FALSE(IsPipe(pipe_name)); |
105 | 107 |
106 pipe_name = L"\\XX\\pipe\\mypipe"; | 108 pipe_name = L"\\XX\\pipe\\mypipe"; |
107 EXPECT_FALSE(IsPipe(pipe_name)); | 109 EXPECT_FALSE(IsPipe(pipe_name)); |
108 | 110 |
109 pipe_name = L"\\Device\\NamedPipe\\mypipe"; | 111 pipe_name = L"\\Device\\NamedPipe\\mypipe"; |
110 EXPECT_FALSE(IsPipe(pipe_name)); | 112 EXPECT_FALSE(IsPipe(pipe_name)); |
111 } | 113 } |
OLD | NEW |