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

Issue 419673004: gin test - add simple file access for JS (Closed)

Created:
6 years, 4 months ago by hansmuller
Modified:
6 years, 4 months ago
Reviewers:
abarth-chromium
CC:
chromium-reviews
Project:
chromium
Visibility:
Public.

Description

The mojo JS message header validation tests load text files that encode binary messages. A simple gin file access module would simplify writing the tests: file.getSourceRootDirectory() - return the path to the root src directory file.getFilesInDirectory(path) - return an array of the filenames found in path. Do not return subdirectory names or links. file.readFileToString(path) - return the contents of the file as a string. BUG=397554 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286484

Patch Set 1 #

Patch Set 2 : Use base::FilePath::StringType for filenames #

Patch Set 3 #

Patch Set 4 : Convert to/from FilePath strings with UTF8Unsafe methods #

Total comments: 6

Patch Set 5 : Use function arguments parameter for its isolate #

Patch Set 6 : Add null return tests for no-args and non-existant paths #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -5 lines) Patch
M gin/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M gin/gin.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
A + gin/test/file.h View 2 chunks +5 lines, -5 lines 0 comments Download
A gin/test/file.cc View 1 2 3 4 5 1 chunk +85 lines, -0 lines 2 comments Download
M gin/test/file_runner.cc View 2 chunks +2 lines, -0 lines 0 comments Download
A gin/test/file_unittests.js View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
M gin/test/run_js_tests.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
hansmuller
A little file access to simplify writing the Mojo message validation tests that read text-encoded ...
6 years, 4 months ago (2014-07-25 23:29:11 UTC) #1
abarth-chromium
LGTM https://codereview.chromium.org/419673004/diff/60001/gin/test/file.cc File gin/test/file.cc (right): https://codereview.chromium.org/419673004/diff/60001/gin/test/file.cc#newcode36 gin/test/file.cc:36: return gin::Converter<std::string>::ToV8(args->isolate(), contents); You should be able to ...
6 years, 4 months ago (2014-07-27 03:26:47 UTC) #2
hansmuller
I'm using JS null return values (see below) so I think I need to use ...
6 years, 4 months ago (2014-07-28 16:44:59 UTC) #3
abarth-chromium
https://codereview.chromium.org/419673004/diff/100001/gin/test/file.cc File gin/test/file.cc (right): https://codereview.chromium.org/419673004/diff/100001/gin/test/file.cc#newcode36 gin/test/file.cc:36: return gin::Converter<std::string>::ToV8(args->isolate(), contents); We should use a type like ...
6 years, 4 months ago (2014-07-29 16:47:04 UTC) #4
abarth-chromium
To clarify, this CL still LGTM. The note about base::NullableString is a suggestion for future ...
6 years, 4 months ago (2014-07-29 16:56:34 UTC) #5
hansmuller
Will commit this CL and then do a follow-on for NullableString8. https://codereview.chromium.org/419673004/diff/100001/gin/test/file.cc File gin/test/file.cc (right): ...
6 years, 4 months ago (2014-07-29 17:16:25 UTC) #6
hansmuller
The CQ bit was checked by hansmuller@chromium.org
6 years, 4 months ago (2014-07-29 17:16:33 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hansmuller@chromium.org/419673004/100001
6 years, 4 months ago (2014-07-29 17:17:56 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-07-30 10:39:44 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 11:44:49 UTC) #10
Message was sent while issue was closed.
Change committed as 286484

Powered by Google App Engine
This is Rietveld 408576698