Remove usage of base::StringPrintf in unit tests (issue #1632)

This commit is contained in:
Marshall Greenblatt
2016-11-14 13:28:05 -05:00
parent 03f3900d75
commit 9ed17519a9
3 changed files with 37 additions and 28 deletions

View File

@ -3,10 +3,9 @@
// can be found in the LICENSE file.
#include <algorithm>
#include <sstream>
#include <string>
#include "base/strings/stringprintf.h"
#include "include/base/cef_bind.h"
#include "include/cef_cookie.h"
#include "include/wrapper/cef_closure_task.h"
@ -99,10 +98,13 @@ class NetNotifyTestHandler : public TestHandler {
same_origin_(same_origin) {}
void SetupTest() override {
url1_ = base::StringPrintf("%snav1.html?t=%d",
kNetNotifyOrigin1, test_type_);
url2_ = base::StringPrintf("%snav2.html?t=%d",
same_origin_ ? kNetNotifyOrigin1 : kNetNotifyOrigin2, test_type_);
std::stringstream ss;
ss << kNetNotifyOrigin1 << "nav1.html?t=" << test_type_;
url1_ = ss.str();
ss.str("");
ss << (same_origin_ ? kNetNotifyOrigin1 : kNetNotifyOrigin2) <<
"nav2.html?t=" << test_type_;
url2_ = ss.str();
cookie_manager_ = CefCookieManager::CreateManager(CefString(), true, NULL);