Index: chrome/browser/safe_browsing/preference_validation_delegate_unittest.cc |
diff --git a/chrome/browser/safe_browsing/preference_validation_delegate_unittest.cc b/chrome/browser/safe_browsing/preference_validation_delegate_unittest.cc |
index 0e66dc00ed80e9e9806b607197dcf4a5344ea45b..e4d32ef71d50d5ae04ca9672712603658f9cb148 100644 |
--- a/chrome/browser/safe_browsing/preference_validation_delegate_unittest.cc |
+++ b/chrome/browser/safe_browsing/preference_validation_delegate_unittest.cc |
@@ -83,6 +83,17 @@ class PreferenceValidationDelegateTest : public testing::Test { |
scoped_ptr<TrackedPreferenceValidationDelegate> instance_; |
}; |
+// Tests that a NULL value results in an incident with no value. |
+TEST_F(PreferenceValidationDelegateTest, NullValue) { |
+ instance_->OnAtomicPreferenceValidation(kPrefPath_, |
+ NULL, |
+ PrefHashStoreTransaction::CLEARED, |
+ TrackedPreferenceHelper::DONT_RESET); |
+ safe_browsing::ClientIncidentReport_IncidentData* incident = |
+ incidents_.back(); |
+ EXPECT_FALSE(incident->tracked_preference().has_atomic_value()); |
gab
2014/06/16 22:33:27
Optional: instead of returning no serialized value
grt (UTC plus 2)
2014/06/17 02:05:33
value_state() indicates that it was cleared. i've
|
+} |
+ |
// Tests that all supported value types can be stringified into an incident. The |
// parameters for the test are the type of value to test and the expected value |
// string. |