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

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

Issue 103163003: Revert 238458 "cc: Defer first OutputSurface creation until clie..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 | Annotate | Revision Log
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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 std::string path_ascii = path.MaybeAsASCII(); 296 std::string path_ascii = path.MaybeAsASCII();
297 CHECK(!path_ascii.empty()); 297 CHECK(!path_ascii.empty());
298 return blink::WebString::fromUTF8(path_ascii.c_str()); 298 return blink::WebString::fromUTF8(path_ascii.c_str());
299 } 299 }
300 300
301 blink::WebLayerTreeView* 301 blink::WebLayerTreeView*
302 TestWebKitPlatformSupport::createLayerTreeViewForTesting() { 302 TestWebKitPlatformSupport::createLayerTreeViewForTesting() {
303 scoped_ptr<WebLayerTreeViewImplForTesting> view( 303 scoped_ptr<WebLayerTreeViewImplForTesting> view(
304 new WebLayerTreeViewImplForTesting()); 304 new WebLayerTreeViewImplForTesting());
305 305
306 view->Initialize(); 306 if (!view->Initialize())
307 return NULL;
307 return view.release(); 308 return view.release();
308 } 309 }
309 310
310 blink::WebLayerTreeView* 311 blink::WebLayerTreeView*
311 TestWebKitPlatformSupport::createLayerTreeViewForTesting(TestViewType type) { 312 TestWebKitPlatformSupport::createLayerTreeViewForTesting(TestViewType type) {
312 DCHECK_EQ(TestViewTypeUnitTest, type); 313 DCHECK_EQ(TestViewTypeUnitTest, type);
313 return createLayerTreeViewForTesting(); 314 return createLayerTreeViewForTesting();
314 } 315 }
315 316
316 blink::WebData TestWebKitPlatformSupport::readFromFile( 317 blink::WebData TestWebKitPlatformSupport::readFromFile(
317 const blink::WebString& path) { 318 const blink::WebString& path) {
318 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); 319 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path);
319 320
320 std::string buffer; 321 std::string buffer;
321 base::ReadFileToString(file_path, &buffer); 322 base::ReadFileToString(file_path, &buffer);
322 323
323 return blink::WebData(buffer.data(), buffer.size()); 324 return blink::WebData(buffer.data(), buffer.size());
324 } 325 }
325 326
326 } // namespace content 327 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698