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

Issue 2324103002: Cleanup EXPECT/ASSERTs in unit tests in core/fetch and core/loader (Closed)

Created:
4 years, 3 months ago by hiroshige
Modified:
4 years, 3 months ago
Reviewers:
yhirano
CC:
chromium-reviews, tyoshino+watch_chromium.org, gavinp+prerender_chromium.org, Yoav Weiss, loading-reviews_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup EXPECT/ASSERTs in unit tests in core/fetch and core/loader - Use EXPECT_.*() where possible instead of ASSERT_.*() - Use the argument order of EXPECT_EQ(expected, actual) - Remove unnecessary casts - Replace EXPECT_EQ/NE(nullptr) with EXPECT_FALSE/TRUE() - Replace EXPECT_STREQ() with EXPECT_EQ() using WTF::String comparison BUG=none Committed: https://crrev.com/9cda388f3c8f935fefff65703b63b61ff77eefac Cr-Commit-Position: refs/heads/master@{#417550}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Use EXPECT_TRUE/FALSE instead of EXPECT_NE/EQ(nullptr) #

Patch Set 3 : Replace EXPECT_STREQ(...utf8().data()) with EXPECT_EQ() #

Patch Set 4 : Fix empty-null mismatch #

Patch Set 5 : EXPECT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -143 lines) Patch
M third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp View 6 chunks +51 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp View 9 chunks +56 lines, -56 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResourceTest.cpp View 1 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp View 1 2 3 8 chunks +16 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp View 1 3 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
hiroshige
PTAL.
4 years, 3 months ago (2016-09-09 07:16:26 UTC) #2
yhirano
https://codereview.chromium.org/2324103002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp (right): https://codereview.chromium.org/2324103002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp#newcode164 third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp:164: ASSERT_TRUE(resource->hasVaryHeader()); expect? https://codereview.chromium.org/2324103002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp#newcode194 third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp:194: ASSERT_TRUE(resource->hasVaryHeader()); ditto https://codereview.chromium.org/2324103002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp#newcode219 third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp:219: ASSERT_TRUE(resource->hasVaryHeader()); ...
4 years, 3 months ago (2016-09-09 07:34:48 UTC) #3
hiroshige
https://codereview.chromium.org/2324103002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp (right): https://codereview.chromium.org/2324103002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp#newcode164 third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp:164: ASSERT_TRUE(resource->hasVaryHeader()); On 2016/09/09 07:34:47, yhirano wrote: > expect? I ...
4 years, 3 months ago (2016-09-09 08:11:36 UTC) #5
yhirano
lgtm
4 years, 3 months ago (2016-09-09 09:07:36 UTC) #6
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/2324103002/80001
4 years, 3 months ago (2016-09-09 09:16:52 UTC) #8
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 10:33:31 UTC) #11
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/9cda388f3c8f935fefff65703b63b61ff77eefac
Cr-Commit-Position: refs/heads/master@{#417550}

Powered by Google App Engine
This is Rietveld 408576698