fix: nws13n: make ses.setUserAgent work (#20014)

* refactor tests to better control window creation

* fix: nws13n: make ses.setUserAgent work
This commit is contained in:
Jeremy Apthorp 2019-08-28 23:50:14 -07:00 committed by Cheng Zhao
parent b3947d6a83
commit 90d62e5b98
4 changed files with 158 additions and 30 deletions

View file

@ -490,8 +490,10 @@ void Session::AllowNTLMCredentialsForDomains(const std::string& domains) {
void Session::SetUserAgent(const std::string& user_agent,
mate::Arguments* args) {
CHECK(false)
<< "TODO: This was disabled when the network service was turned on";
browser_context_->SetUserAgent(user_agent);
content::BrowserContext::GetDefaultStoragePartition(browser_context_.get())
->GetNetworkContext()
->SetUserAgent(user_agent);
}
std::string Session::GetUserAgent() {