| Index: components/sync/engine_impl/js_mutation_event_observer_unittest.cc
|
| diff --git a/components/sync/engine_impl/js_mutation_event_observer_unittest.cc b/components/sync/engine_impl/js_mutation_event_observer_unittest.cc
|
| index 1a8da574aef4618f112f6e3aaa5ee36d6e13644a..cffd8925f7b2a36b1ca6a6454143dad0905783da 100644
|
| --- a/components/sync/engine_impl/js_mutation_event_observer_unittest.cc
|
| +++ b/components/sync/engine_impl/js_mutation_event_observer_unittest.cc
|
| @@ -4,6 +4,9 @@
|
|
|
| #include "components/sync/engine_impl/js_mutation_event_observer.h"
|
|
|
| +#include <utility>
|
| +
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/run_loop.h"
|
| #include "base/test/scoped_task_environment.h"
|
| #include "base/values.h"
|
| @@ -69,11 +72,11 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) {
|
| base::DictionaryValue expected_details;
|
| expected_details.SetString("modelType", model_type_str);
|
| expected_details.SetString("writeTransactionId", "0");
|
| - base::ListValue* expected_changes = new base::ListValue();
|
| - expected_details.Set("changes", expected_changes);
|
| + auto expected_changes = base::MakeUnique<base::ListValue>();
|
| for (int j = i; j < MODEL_TYPE_COUNT; ++j) {
|
| expected_changes->Append(changes[j].ToValue());
|
| }
|
| + expected_details.Set("changes", std::move(expected_changes));
|
| EXPECT_CALL(mock_js_event_handler_,
|
| HandleJsEvent("onChangesApplied",
|
| HasDetailsAsDictionary(expected_details)));
|
|
|