OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" |
7 #include "components/nacl/loader/nacl_validation_db.h" | 8 #include "components/nacl/loader/nacl_validation_db.h" |
8 #include "components/nacl/loader/nacl_validation_query.h" | 9 #include "components/nacl/loader/nacl_validation_query.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 // This test makes sure that validation signature generation is performed | 12 // This test makes sure that validation signature generation is performed |
12 // correctly. In effect, this means that we are checking all of the data | 13 // correctly. In effect, this means that we are checking all of the data |
13 // (and no other data) we are passing the signature generator affects the final | 14 // (and no other data) we are passing the signature generator affects the final |
14 // signature. To avoid tying the tests to a particular implementation, each | 15 // signature. To avoid tying the tests to a particular implementation, each |
15 // test generates two signatures and compares them rather than trying to compare | 16 // test generates two signatures and compares them rather than trying to compare |
16 // against a specified signature. | 17 // against a specified signature. |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 query1->query->AddData(kShortData, sizeof(kShortData)); | 270 query1->query->AddData(kShortData, sizeof(kShortData)); |
270 query1->query->QueryKnownToValidate(); | 271 query1->query->QueryKnownToValidate(); |
271 | 272 |
272 query2->query->AddData(kShortData, sizeof(kShortData)); | 273 query2->query->AddData(kShortData, sizeof(kShortData)); |
273 query2->query->QueryKnownToValidate(); | 274 query2->query->QueryKnownToValidate(); |
274 | 275 |
275 AssertQueryDifferent(); | 276 AssertQueryDifferent(); |
276 } | 277 } |
277 | 278 |
278 } | 279 } |
OLD | NEW |