OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // There must be bits set in ExcMaskValid() that are not set in ExcMaskAll(). | 131 // There must be bits set in ExcMaskValid() that are not set in ExcMaskAll(). |
132 EXPECT_TRUE(ExcMaskValid() & ~ExcMaskAll()); | 132 EXPECT_TRUE(ExcMaskValid() & ~ExcMaskAll()); |
133 } | 133 } |
134 | 134 |
135 TEST(MachExtensions, BootstrapCheckInAndLookUp) { | 135 TEST(MachExtensions, BootstrapCheckInAndLookUp) { |
136 // This should always exist. | 136 // This should always exist. |
137 base::mac::ScopedMachSendRight | 137 base::mac::ScopedMachSendRight |
138 report_crash(BootstrapLookUp("com.apple.ReportCrash")); | 138 report_crash(BootstrapLookUp("com.apple.ReportCrash")); |
139 EXPECT_NE(report_crash, kMachPortNull); | 139 EXPECT_NE(report_crash, kMachPortNull); |
140 | 140 |
141 std::string service_name = "com.googlecode.crashpad.test.bootstrap_check_in."; | 141 std::string service_name = "org.chromium.crashpad.test.bootstrap_check_in."; |
142 for (int index = 0; index < 16; ++index) { | 142 for (int index = 0; index < 16; ++index) { |
143 service_name.append(1, base::RandInt('A', 'Z')); | 143 service_name.append(1, base::RandInt('A', 'Z')); |
144 } | 144 } |
145 | 145 |
146 { | 146 { |
147 // The new service hasn’t checked in yet, so this should fail. | 147 // The new service hasn’t checked in yet, so this should fail. |
148 base::mac::ScopedMachSendRight send(BootstrapLookUp(service_name)); | 148 base::mac::ScopedMachSendRight send(BootstrapLookUp(service_name)); |
149 EXPECT_EQ(kMachPortNull, send); | 149 EXPECT_EQ(kMachPortNull, send); |
150 | 150 |
151 // Check it in. | 151 // Check it in. |
(...skipping 20 matching lines...) Expand all Loading... |
172 | 172 |
173 TEST(MachExtensions, SystemCrashReporterHandler) { | 173 TEST(MachExtensions, SystemCrashReporterHandler) { |
174 base::mac::ScopedMachSendRight | 174 base::mac::ScopedMachSendRight |
175 system_crash_reporter_handler(SystemCrashReporterHandler()); | 175 system_crash_reporter_handler(SystemCrashReporterHandler()); |
176 EXPECT_TRUE(system_crash_reporter_handler.is_valid()); | 176 EXPECT_TRUE(system_crash_reporter_handler.is_valid()); |
177 } | 177 } |
178 | 178 |
179 } // namespace | 179 } // namespace |
180 } // namespace test | 180 } // namespace test |
181 } // namespace crashpad | 181 } // namespace crashpad |
OLD | NEW |