Commit 5e455a79 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

cros settings helper: Commit writes on store

I believe it causes flakes of kiosk browsertest which use this helper

Bug: 1008290
Change-Id: I883a18445b4bbc8d4db6a2901f61c7eb5bf5f8e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1826478Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700146}
parent ed1b21e9
......@@ -17,6 +17,7 @@
#include "components/ownership/mock_owner_key_util.h"
#include "components/policy/proto/chrome_device_policy.pb.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "components/prefs/pref_service.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -121,6 +122,8 @@ void ScopedCrosSettingsTestHelper::StoreCachedDeviceSetting(
OwnerSettingsServiceChromeOS::UpdateDeviceSettings(path, *value, settings);
CHECK(settings.SerializeToString(data.mutable_policy_value()));
CHECK(device_settings_cache::Store(data, g_browser_process->local_state()));
g_browser_process->local_state()->CommitPendingWrite(base::DoNothing(),
base::DoNothing());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment