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

Issue 2841483007: MHTMLTest::TestMHTMLEncoding checks generated MTHML is well formed. (Closed)

Created:
3 years, 8 months ago by carlosk
Modified:
3 years, 8 months ago
CC:
chromium-reviews, blink-reviews, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

MHTMLTest::TestMHTMLEncoding checks generated MTHML is well formed. After generating MHTML data in memory checks that it is well formed by parsing it using MHTMLParser. BUG=672313 Review-Url: https://codereview.chromium.org/2841483007 Cr-Commit-Position: refs/heads/master@{#467125} Committed: https://chromium.googlesource.com/chromium/src/+/8201c9cbc87f806a3fce3df667b36221c600caf0

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move validation into GenerateMHTMLData. #

Total comments: 2

Patch Set 3 : Using ADD_FAILURE and HasFailure. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M third_party/WebKit/Source/web/tests/MHTMLTest.cpp View 1 2 4 chunks +13 lines, -0 lines 1 comment Download

Messages

Total messages: 18 (9 generated)
carlosk
dcheng@, lukasza@: PTAL.
3 years, 8 months ago (2017-04-25 18:06:02 UTC) #4
Łukasz Anforowicz
Thanks for adding the extra validation. This looks good and seems like a very desirable ...
3 years, 8 months ago (2017-04-25 19:01:24 UTC) #5
carlosk
Thanks. https://codereview.chromium.org/2841483007/diff/1/third_party/WebKit/Source/web/tests/MHTMLTest.cpp File third_party/WebKit/Source/web/tests/MHTMLTest.cpp (right): https://codereview.chromium.org/2841483007/diff/1/third_party/WebKit/Source/web/tests/MHTMLTest.cpp#newcode213 third_party/WebKit/Source/web/tests/MHTMLTest.cpp:213: ASSERT_FALSE(parser.ParseArchive().IsEmpty()) << "Invalid MHTML"; On 2017/04/25 19:01:24, Łukasz ...
3 years, 8 months ago (2017-04-25 19:49:30 UTC) #8
Łukasz Anforowicz
LGTM, but I have one more suggestion below (or rather a clarification of what I ...
3 years, 8 months ago (2017-04-25 20:00:45 UTC) #9
carlosk
Thanks. Let me know if the way I'm checking for failures is not OK. https://codereview.chromium.org/2841483007/diff/20001/third_party/WebKit/Source/web/tests/MHTMLTest.cpp ...
3 years, 8 months ago (2017-04-25 20:18:15 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2841483007/40001
3 years, 8 months ago (2017-04-25 20:19:18 UTC) #13
Łukasz Anforowicz
On 2017/04/25 20:18:15, carlosk wrote: > Thanks. Let me know if the way I'm checking ...
3 years, 8 months ago (2017-04-25 20:39:24 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/8201c9cbc87f806a3fce3df667b36221c600caf0
3 years, 8 months ago (2017-04-25 21:47:21 UTC) #17
dcheng
3 years, 8 months ago (2017-04-26 08:52:40 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/2841483007/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/web/tests/MHTMLTest.cpp (right):

https://codereview.chromium.org/2841483007/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/web/tests/MHTMLTest.cpp:219:
ASSERT_FALSE(HasFailure());
Per
https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuid...,
we should either just change Serialize() to use an out param (and use FAIL()) or
be content with a non-fatal assertion. It's a pretty unusual pattern to require
callers to check HasFailure(), as that means that this has to be duplicated
everywhere.

Powered by Google App Engine
This is Rietveld 408576698