This commit is a squash of 4 commits from #3281. - Fix setting preferred color scheme logic for brave theme change - Fix system dark mode change affect brave theme on Win10 When brave theme is set to dark or light, system dark mode change should not affect brave theme. - CleanUp: Delete SystemThemeSupportDarkMode Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one. - Add dark mode change test by modifying reg value for Windows This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery. Chromium change: https://chromium.googlesource.com/chromium/src/+/67fd4d9f35650a079f6a636b5d19de77856bd2cf commit 67fd4d9f35650a079f6a636b5d19de77856bd2cf Author: Alison Maher <almaher@microsoft.com> Date: Fri Jul 12 18:34:21 2019 +0000 Set preferred color scheme for high contrast This change adds logic to update the preferred color scheme based on the OS high contrast theme. If high contrast is not enabled, preferred color scheme will continue to be based on the OS dark mode state. A PreferredColorScheme enum was added to NativeTheme to keep track of the current high contrast/dark mode preferred color scheme. The updated preferred color scheme is used to evaluate the prefers-color-scheme media query. Bug: 970285