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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2745293005: Moving mojo/validation test into LayoutTests (Closed)
Patch Set: Added BUILD action to generate data files list Created 3 years, 9 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 | « BUILD.gn ('k') | mojo/edk/js/tests/run_js_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <clocale> 10 #include <clocale>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 if (is_wpt_mode) { 364 if (is_wpt_mode) {
365 WebURL rewritten_url = RewriteAbsolutePathInCsswgTest(utf8_url); 365 WebURL rewritten_url = RewriteAbsolutePathInCsswgTest(utf8_url);
366 if (!rewritten_url.isEmpty()) 366 if (!rewritten_url.isEmpty())
367 return rewritten_url; 367 return rewritten_url;
368 return WebURL(GURL(utf8_url)); 368 return WebURL(GURL(utf8_url));
369 } 369 }
370 370
371 const char kPrefix[] = "file:///tmp/LayoutTests/"; 371 const char kPrefix[] = "file:///tmp/LayoutTests/";
372 const int kPrefixLen = arraysize(kPrefix) - 1; 372 const int kPrefixLen = arraysize(kPrefix) - 1;
373 373
374 if (utf8_url.compare(0, kPrefixLen, kPrefix, kPrefixLen)) 374 const char genPrefix[] = "file:///gen/LayoutTests/";
375 const int genPrefixLen = arraysize(genPrefix) - 1;
376
377 if (utf8_url.compare(0, kPrefixLen, kPrefix, kPrefixLen) &&
378 utf8_url.compare(0, genPrefixLen, genPrefix, genPrefixLen))
damargulis 2017/03/18 01:22:43 I was able to use the BUILD.gn file to generate a
375 return WebURL(GURL(utf8_url)); 379 return WebURL(GURL(utf8_url));
376 380
377 base::FilePath replace_path = 381 base::FilePath replace_path =
378 LayoutTestRenderThreadObserver::GetInstance()->webkit_source_dir() 382 LayoutTestRenderThreadObserver::GetInstance()->webkit_source_dir()
379 .Append(FILE_PATH_LITERAL("LayoutTests/")); 383 .Append(FILE_PATH_LITERAL("LayoutTests/"));
380 std::string utf8_path = replace_path.AsUTF8Unsafe(); 384 std::string utf8_path = replace_path.AsUTF8Unsafe();
381 std::string new_url = 385 std::string new_url =
382 std::string("file://") + utf8_path + utf8_url.substr(kPrefixLen); 386 std::string("file://") + utf8_path + utf8_url.substr(kPrefixLen);
383 return WebURL(GURL(new_url)); 387 return WebURL(GURL(new_url));
384 } 388 }
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 void BlinkTestRunner::ReportLeakDetectionResult( 1043 void BlinkTestRunner::ReportLeakDetectionResult(
1040 const LeakDetectionResult& report) { 1044 const LeakDetectionResult& report) {
1041 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1045 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1042 } 1046 }
1043 1047
1044 void BlinkTestRunner::OnDestruct() { 1048 void BlinkTestRunner::OnDestruct() {
1045 delete this; 1049 delete this;
1046 } 1050 }
1047 1051
1048 } // namespace content 1052 } // namespace content
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | mojo/edk/js/tests/run_js_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698