| 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 "net/base/keygen_handler.h" | 5 #include "net/base/keygen_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 for (int i = 0; i < NUM_HANDLERS; i++) { | 126 for (int i = 0; i < NUM_HANDLERS; i++) { |
| 127 events[i] = new base::WaitableEvent(false, false); | 127 events[i] = new base::WaitableEvent(false, false); |
| 128 base::WorkerPool::PostTask( | 128 base::WorkerPool::PostTask( |
| 129 FROM_HERE, | 129 FROM_HERE, |
| 130 new ConcurrencyTestTask(events[i], "some challenge", &results[i]), | 130 new ConcurrencyTestTask(events[i], "some challenge", &results[i]), |
| 131 true); | 131 true); |
| 132 } | 132 } |
| 133 | 133 |
| 134 for (int i = 0; i < NUM_HANDLERS; i++) { | 134 for (int i = 0; i < NUM_HANDLERS; i++) { |
| 135 // Make sure the job completed | 135 // Make sure the job completed |
| 136 bool signaled = events[i]->Wait(); | 136 events[i]->Wait(); |
| 137 EXPECT_TRUE(signaled); | |
| 138 delete events[i]; | 137 delete events[i]; |
| 139 events[i] = NULL; | 138 events[i] = NULL; |
| 140 | 139 |
| 141 VLOG(1) << "KeygenHandler " << i << " produced: " << results[i]; | 140 VLOG(1) << "KeygenHandler " << i << " produced: " << results[i]; |
| 142 AssertValidSignedPublicKeyAndChallenge(results[i], "some challenge"); | 141 AssertValidSignedPublicKeyAndChallenge(results[i], "some challenge"); |
| 143 } | 142 } |
| 144 } | 143 } |
| 145 | 144 |
| 146 } // namespace | 145 } // namespace |
| 147 | 146 |
| 148 } // namespace net | 147 } // namespace net |
| OLD | NEW |