| OLD | NEW |
| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 blink::WebLayerTreeView* | 267 blink::WebLayerTreeView* |
| 268 TestWebKitPlatformSupport::createLayerTreeViewForTesting() { | 268 TestWebKitPlatformSupport::createLayerTreeViewForTesting() { |
| 269 scoped_ptr<WebLayerTreeViewImplForTesting> view( | 269 scoped_ptr<WebLayerTreeViewImplForTesting> view( |
| 270 new WebLayerTreeViewImplForTesting()); | 270 new WebLayerTreeViewImplForTesting()); |
| 271 | 271 |
| 272 view->Initialize(); | 272 view->Initialize(); |
| 273 return view.release(); | 273 return view.release(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 blink::WebLayerTreeView* | |
| 277 TestWebKitPlatformSupport::createLayerTreeViewForTesting(TestViewType type) { | |
| 278 DCHECK_EQ(TestViewTypeUnitTest, type); | |
| 279 return createLayerTreeViewForTesting(); | |
| 280 } | |
| 281 | |
| 282 blink::WebData TestWebKitPlatformSupport::readFromFile( | 276 blink::WebData TestWebKitPlatformSupport::readFromFile( |
| 283 const blink::WebString& path) { | 277 const blink::WebString& path) { |
| 284 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); | 278 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); |
| 285 | 279 |
| 286 std::string buffer; | 280 std::string buffer; |
| 287 base::ReadFileToString(file_path, &buffer); | 281 base::ReadFileToString(file_path, &buffer); |
| 288 | 282 |
| 289 return blink::WebData(buffer.data(), buffer.size()); | 283 return blink::WebData(buffer.data(), buffer.size()); |
| 290 } | 284 } |
| 291 | 285 |
| 292 } // namespace content | 286 } // namespace content |
| OLD | NEW |