diff --git a/tests/ceftests/urlrequest_unittest.cc b/tests/ceftests/urlrequest_unittest.cc index 4bb39f1f8..0d6d50d6e 100644 --- a/tests/ceftests/urlrequest_unittest.cc +++ b/tests/ceftests/urlrequest_unittest.cc @@ -15,6 +15,7 @@ #include "include/cef_task.h" #include "include/cef_urlrequest.h" #include "include/cef_waitable_event.h" +#include "include/test/cef_test_helpers.h" #include "include/wrapper/cef_closure_task.h" #include "include/wrapper/cef_scoped_temp_dir.h" #include "tests/ceftests/test_handler.h" @@ -473,8 +474,15 @@ void VerifyNormalRequest(const RequestRunSettings* settings, // CEF_SETTINGS_ACCEPT_LANGUAGE value from CefSettings.accept_language_list // set in CefTestSuite::GetSettings() and expanded internally by // ComputeAcceptLanguageFromPref. - EXPECT_STREQ("en-GB,en;q=0.9", - GetHeaderValue(headerMap, "accept-language").c_str()); + const std::string& accept_language = + GetHeaderValue(headerMap, "accept-language"); + if (CefIsFeatureEnabledForTests("ReduceAcceptLanguage")) { + EXPECT_TRUE(accept_language == "en-GB" || + accept_language == "en-GB,en;q=0.9") + << accept_language; + } else { + EXPECT_STREQ("en-GB,en;q=0.9", accept_language.data()); + } if (server_backend) { EXPECT_FALSE(GetHeaderValue(headerMap, "accept-encoding").empty());