Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1353)

Unified Diff: src/trusted/validator/validation_cache_test.cc

Issue 10134056: Refactor the process of choosing validators. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: draft that does not fully build Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator/validation_cache_test.cc
diff --git a/src/trusted/validator/validation_cache_test.cc b/src/trusted/validator/validation_cache_test.cc
index ddc54dd077a412bc9682279e550b241f1faec285..5cb18bf0b161b994106d551b2d8b08c9152621f6 100644
--- a/src/trusted/validator/validation_cache_test.cc
+++ b/src/trusted/validator/validation_cache_test.cc
@@ -127,13 +127,13 @@ class ValidationCachingInterfaceTests : public ::testing::Test {
}
NaClValidationStatus Validate() {
- return NACL_SUBARCH_NAME(ApplyValidator,
- NACL_TARGET_ARCH,
- NACL_TARGET_SUBARCH)(
- 0, code_buffer, 32,
- /* stubout_mode= */ FALSE,
- /* readonly_test= */ FALSE, &cpu_features,
- &cache);
+ /* TODO: update this */
+ struct NaClValidatorInterface *validator;
+ NaClSelectValidator(&validator);
+ return validator->Validate(0, code_buffer, 32,
+ /* stubout_mode= */ FALSE,
+ /* readonly_test= */ FALSE, &cpu_features,
+ &cache);
}
};
@@ -147,15 +147,18 @@ TEST_F(ValidationCachingInterfaceTests, Sanity) {
}
TEST_F(ValidationCachingInterfaceTests, NoCache) {
- NaClValidationStatus status =
- NACL_SUBARCH_NAME(ApplyValidator,
- NACL_TARGET_ARCH,
- NACL_TARGET_SUBARCH)(
- 0, code_buffer, CODE_SIZE,
- /* stubout_mode= */ FALSE,
- /* readonly_test= */ FALSE, &cpu_features,
- NULL);
+ /* TODO: link with something containing NaClSelectValidator. */
+#if 0
+ struct NaClValidatorInterface *validator;
+ NaClSelectValidator(&validator);
+ NaClValidationStatus status = validator->Validate(
+ 0, code_buffer, CODE_SIZE,
+ FALSE, /* stubout_mode */
+ FALSE, /* readonly_test */
+ &cpu_features,
+ NULL);
EXPECT_EQ(NaClValidationSucceeded, status);
+#endif
}
TEST_F(ValidationCachingInterfaceTests, CacheHit) {

Powered by Google App Engine
This is Rietveld 408576698