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

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

Issue 1413373007: CC AnimationHost: Fix LinkHighlights detach scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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
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_blink_web_unit_test_support.h" 5 #include "content/test/test_blink_web_unit_test_support.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 PathService::Get(base::DIR_SOURCE_ROOT, &path); 322 PathService::Get(base::DIR_SOURCE_ROOT, &path);
323 path = path.Append(FILE_PATH_LITERAL("third_party/WebKit")); 323 path = path.Append(FILE_PATH_LITERAL("third_party/WebKit"));
324 path = base::MakeAbsoluteFilePath(path); 324 path = base::MakeAbsoluteFilePath(path);
325 CHECK(!path.empty()); 325 CHECK(!path.empty());
326 std::string path_ascii = path.MaybeAsASCII(); 326 std::string path_ascii = path.MaybeAsASCII();
327 CHECK(!path_ascii.empty()); 327 CHECK(!path_ascii.empty());
328 return blink::WebString::fromUTF8(path_ascii.c_str()); 328 return blink::WebString::fromUTF8(path_ascii.c_str());
329 } 329 }
330 330
331 blink::WebLayerTreeView* 331 blink::WebLayerTreeView*
332 TestBlinkWebUnitTestSupport::createLayerTreeViewForTesting() { 332 TestBlinkWebUnitTestSupport::createLayerTreeViewForTesting(
333 bool use_compositor_animation_timelines) {
333 scoped_ptr<WebLayerTreeViewImplForTesting> view( 334 scoped_ptr<WebLayerTreeViewImplForTesting> view(
334 new WebLayerTreeViewImplForTesting()); 335 new WebLayerTreeViewImplForTesting());
335 336
336 view->Initialize(); 337 view->Initialize(use_compositor_animation_timelines);
337 return view.release(); 338 return view.release();
338 } 339 }
339 340
340 blink::WebData TestBlinkWebUnitTestSupport::readFromFile( 341 blink::WebData TestBlinkWebUnitTestSupport::readFromFile(
341 const blink::WebString& path) { 342 const blink::WebString& path) {
342 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); 343 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path);
343 344
344 std::string buffer; 345 std::string buffer;
345 base::ReadFileToString(file_path, &buffer); 346 base::ReadFileToString(file_path, &buffer);
346 347
(...skipping 22 matching lines...) Expand all
369 base::MessageLoop::current()->QuitWhenIdle(); 370 base::MessageLoop::current()->QuitWhenIdle();
370 } 371 }
371 372
372 void TestBlinkWebUnitTestSupport::getPluginList( 373 void TestBlinkWebUnitTestSupport::getPluginList(
373 bool refresh, blink::WebPluginListBuilder* builder) { 374 bool refresh, blink::WebPluginListBuilder* builder) {
374 builder->addPlugin("pdf", "pdf", "pdf-files"); 375 builder->addPlugin("pdf", "pdf", "pdf-files");
375 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); 376 builder->addMediaTypeToLastPlugin("application/pdf", "pdf");
376 } 377 }
377 378
378 } // namespace content 379 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698