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

Issue 2830533002: Split ScriptStreamer and ScriptStreamerImpl, preparing for unit testing (Closed)

Created:
3 years, 8 months ago by hiroshige
Modified:
3 years, 8 months ago
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, blink-reviews, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Split ScriptStreamer and ScriptStreamerImpl, preparing for unit testing In order to create a mock subclass of ScriptStreamer for unit testing of PendingScript (e.g. in https://codereview.chromium.org/2653923008/). This CL shouldn't change the behavior. BUG=694702

Patch Set 1 #

Patch Set 2 : delete #

Patch Set 3 : nits #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -833 lines) Patch
M third_party/WebKit/Source/bindings/bindings.gni View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h View 1 2 3 chunks +16 lines, -112 lines 0 comments Download
D third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp View 1 1 chunk +0 lines, -628 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.h View 4 chunks +25 lines, -44 lines 0 comments Download
A + third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp View 1 15 chunks +32 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp View 11 chunks +13 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamerThread.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/PendingScript.cpp View 2 chunks +2 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 28 (16 generated)
hiroshige
PTAL.
3 years, 8 months ago (2017-04-19 00:43:26 UTC) #10
haraken
LGTM
3 years, 8 months ago (2017-04-19 07:39:28 UTC) #15
marja
What kind of unit testing does this enable? Can you e.g., give an example of ...
3 years, 8 months ago (2017-04-19 08:03:40 UTC) #16
marja
+ vogelheim who's working on the streaming now
3 years, 8 months ago (2017-04-19 08:45:14 UTC) #18
hiroshige
On 2017/04/19 08:03:40, marja wrote: > What kind of unit testing does this enable? Can ...
3 years, 8 months ago (2017-04-19 16:06:17 UTC) #19
blink-reviews
On Wed, Apr 19, 2017 at 6:06 PM, <hiroshige@chromium.org> wrote: > On 2017/04/19 08:03:40, marja ...
3 years, 8 months ago (2017-04-19 16:20:05 UTC) #21
chromium-reviews
On Wed, Apr 19, 2017 at 6:06 PM, <hiroshige@chromium.org> wrote: > On 2017/04/19 08:03:40, marja ...
3 years, 8 months ago (2017-04-19 16:20:05 UTC) #22
hiroshige
> Wouldn't it suffice for mocking to merely make the methods of > interest virtual? ...
3 years, 8 months ago (2017-04-19 16:43:54 UTC) #24
hiroshige
On 2017/04/19 16:43:54, hiroshige wrote: > > Wouldn't it suffice for mocking to merely make ...
3 years, 8 months ago (2017-04-19 16:44:29 UTC) #25
hiroshige
On 2017/04/19 16:44:29, hiroshige wrote: > On 2017/04/19 16:43:54, hiroshige wrote: > > > Wouldn't ...
3 years, 8 months ago (2017-04-19 23:44:27 UTC) #26
blink-reviews
On Thu, Apr 20, 2017 at 1:44 AM, <hiroshige@chromium.org> wrote: > On 2017/04/19 16:44:29, hiroshige ...
3 years, 8 months ago (2017-04-20 08:53:23 UTC) #27
chromium-reviews
3 years, 8 months ago (2017-04-20 08:53:23 UTC) #28
On Thu, Apr 20, 2017 at 1:44 AM, <hiroshige@chromium.org> wrote:

> On 2017/04/19 16:44:29, hiroshige wrote:
> > On 2017/04/19 16:43:54, hiroshige wrote:
> > > > Wouldn't it suffice for mocking to merely make the methods of
> > > > interest virtual?
> > > Probably. Or I might be able to write the test with unmodified
> > > ScriptStreamer if I do the similar thing in ScriptStreamerTest.cpp.
> > > (ScriptStreamerTest.cpp looks testing PendingScript-ScriptStreamer
> > interactions,
> > > so perhaps it's better to put the test to ScriptStreamerTest.cpp)
> > > I'll try.
> >
> > +japhet@ FYI if you're interested in unit testing around PendingScript.
>
> How about https://codereview.chromium.org/2828973002/ (which doesn't
> change
> ScriptStreamer)?
> If that looks good, then I'll close this CL.
>

That does look very nice. :)

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698