Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: chrome/test/data/webui/webui_resource_browsertest.cc

Issue 1968993002: Compressing .pak resources with new option: "type=GZIPPABLE_BINDATA" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Python formatting Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/webui_resource_browsertest.cc
diff --git a/chrome/test/data/webui/webui_resource_browsertest.cc b/chrome/test/data/webui/webui_resource_browsertest.cc
index e6bcf8f01746401695eecb85e93097d04f24484d..8ad1818fee2b8fa1a16464328572c263cc0854eb 100644
--- a/chrome/test/data/webui/webui_resource_browsertest.cc
+++ b/chrome/test/data/webui/webui_resource_browsertest.cc
@@ -36,8 +36,10 @@ class WebUIResourceBrowserTest : public InProcessBrowserTest {
void LoadResource(int idr) {
ResourceBundle& bundle = ResourceBundle::GetSharedInstance();
- base::StringPiece resource = bundle.GetRawDataResource(idr);
- RunTest(GURL(std::string("data:text/html,") + resource.as_string()));
+ scoped_refptr<base::RefCountedMemory> resource =
+ bundle.LoadDataResourceBytes(idr);
+ RunTest(GURL(std::string("data:text/html,") +
+ std::string(resource->front_as<char>(), resource->size())));
}
// Queues the library corresponding to |resource_id| for injection into the
« no previous file with comments | « chrome/browser/resources/translate_internals_resources.grd ('k') | components/resources/gcm_driver_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698