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

Side by Side Diff: content/test/test_webkit_platform_support.cc

Issue 456413002: Move the user agent styles sheets to blink_resources.grd (Part 2) with Unit test support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch after rebased! Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/test/test_content_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/test_webkit_platform_support.h" 5 #include "content/test/test_webkit_platform_support.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80" 156 "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80"
157 "\x80\xc0\xc0\xc0\xff\x00\x00\x00\xff\x00\xff\xff\x00\x00\x00\xff" 157 "\x80\xc0\xc0\xc0\xff\x00\x00\x00\xff\x00\xff\xff\x00\x00\x00\xff"
158 "\xff\x00\xff\x00\xff\xff\xff\xff\xff\x7b\x1f\xb1\xc4\x00\x00\x00" 158 "\xff\x00\xff\x00\xff\xff\xff\xff\xff\x7b\x1f\xb1\xc4\x00\x00\x00"
159 "\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\x00\x9a" 159 "\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\x00\x9a"
160 "\x9c\x18\x00\x00\x00\x17\x49\x44\x41\x54\x78\x01\x63\x98\x89\x0a" 160 "\x9c\x18\x00\x00\x00\x17\x49\x44\x41\x54\x78\x01\x63\x98\x89\x0a"
161 "\x18\x50\xb9\x33\x47\xf9\xa8\x01\x32\xd4\xc2\x03\x00\x33\x84\x0d" 161 "\x18\x50\xb9\x33\x47\xf9\xa8\x01\x32\xd4\xc2\x03\x00\x33\x84\x0d"
162 "\x02\x3a\x91\xeb\xa5\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60" 162 "\x02\x3a\x91\xeb\xa5\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60"
163 "\x82"; 163 "\x82";
164 return blink::WebData(red_square, arraysize(red_square)); 164 return blink::WebData(red_square, arraysize(red_square));
165 } 165 }
166 return blink::WebData(); 166 return BlinkPlatformImpl::loadResource(name);
167 } 167 }
168 168
169 blink::WebString TestWebKitPlatformSupport::queryLocalizedString( 169 blink::WebString TestWebKitPlatformSupport::queryLocalizedString(
170 blink::WebLocalizedString::Name name) { 170 blink::WebLocalizedString::Name name) {
171 // Returns placeholder strings to check if they are correctly localized. 171 // Returns placeholder strings to check if they are correctly localized.
172 switch (name) { 172 switch (name) {
173 case blink::WebLocalizedString::OtherDateLabel: 173 case blink::WebLocalizedString::OtherDateLabel:
174 return base::ASCIIToUTF16("<<OtherDateLabel>>"); 174 return base::ASCIIToUTF16("<<OtherDateLabel>>");
175 case blink::WebLocalizedString::OtherMonthLabel: 175 case blink::WebLocalizedString::OtherMonthLabel:
176 return base::ASCIIToUTF16("<<OtherMonthLabel>>"); 176 return base::ASCIIToUTF16("<<OtherMonthLabel>>");
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 const blink::WebString& path) { 294 const blink::WebString& path) {
295 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); 295 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path);
296 296
297 std::string buffer; 297 std::string buffer;
298 base::ReadFileToString(file_path, &buffer); 298 base::ReadFileToString(file_path, &buffer);
299 299
300 return blink::WebData(buffer.data(), buffer.size()); 300 return blink::WebData(buffer.data(), buffer.size());
301 } 301 }
302 302
303 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_content_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698