Index: components/subresource_filter/core/browser/subresource_filter_features_test_support.cc |
diff --git a/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc b/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc |
index df18a7386246c667b6fb29c82310aa4f34c1bfbf..dcd7c3150544f0ea6f087a78863d1fa75471d928 100644 |
--- a/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc |
+++ b/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc |
@@ -4,11 +4,15 @@ |
#include "components/subresource_filter/core/browser/subresource_filter_features_test_support.h" |
+#include <ostream> |
#include <utility> |
+#include "base/json/json_writer.h" |
#include "base/memory/ptr_util.h" |
#include "base/memory/ref_counted.h" |
#include "base/strings/string_util.h" |
+#include "base/trace_event/trace_event_argument.h" |
+#include "base/values.h" |
namespace subresource_filter { |
namespace testing { |
@@ -83,5 +87,15 @@ void ScopedSubresourceFilterFeatureToggle::ResetSubresourceFilterState( |
ScopedSubresourceFilterFeatureToggle::~ScopedSubresourceFilterFeatureToggle() {} |
+std::ostream& operator<<(std::ostream& os, const Configuration& config) { |
+ std::unique_ptr<base::Value> value = config.ToTracedValue()->ToBaseValue(); |
+ base::DictionaryValue* dict; |
+ value->GetAsDictionary(&dict); |
+ std::string json; |
+ base::JSONWriter::WriteWithOptions( |
+ *dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); |
+ return os << json; |
+} |
+ |
} // namespace testing |
} // namespace subresource_filter |