Commit 171317db authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Avoid hard-coded Linux path in grit test expectations

Many of the grit presubmits fail on Windows. This fixes one of them by
replacing a hard-coded Linux path with os.path.join.

Change-Id: I1e2944f617369efa13bc64dc6e4163d38c12e490
Reviewed-on: https://chromium-review.googlesource.com/c/1484812
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634909}
parent 2fabc022
......@@ -109,13 +109,14 @@ const size_t kTheRcHeaderSize = base::size(kTheRcHeader);''', output)
formatter = resource_map.GetFormatter('gzipped_resource_file_map_source')
output = util.StripBlankLinesAndComments(''.join(formatter(grd, 'en', '.')))
gen_path = os.path.join('@out_folder@', 'gen', 'foo', 'bar', 'baz.js')
expected = '''\
#include "gzipped_resource_map_header.h"
#include <stddef.h>
#include "base/stl_util.h"
#include "the_rc_header.h"
const GzippedGritResourceMap kTheRcHeader[] = {
{"@out_folder@/gen/foo/bar/baz.js", IDR_FOO_BAR_BAZ_JS, true},
{"''' + gen_path + '''", IDR_FOO_BAR_BAZ_JS, true},
};
const size_t kTheRcHeaderSize = base::size(kTheRcHeader);'''
self.assertEqual(expected, output)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment