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

Issue 2685653002: Remove TabModel -replaceWebState: method. (Closed)

Created:
3 years, 10 months ago by sdefresne
Modified:
3 years, 10 months ago
CC:
chromium-reviews, marq+watch_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove TabModel -replaceWebState: method. In order to allow refactoring Tab and WebState ownership relationship, remove the method allowing a test to replace the WebState owned by a Tab. The method was only used from two tests suites to allow using a mock CRWWebController. As the mock is only implementing part of the class API, registering the tab helpers with the WebState fails. Instead introduce an additional parameter to the Tab initialiser to control whether the tab helpers are registered or not. Call this new initialiser from the two test suites to allow them to control which tab helpers are initialised. BUG=687207 Review-Url: https://codereview.chromium.org/2685653002 Cr-Commit-Position: refs/heads/master@{#448995} Committed: https://chromium.googlesource.com/chromium/src/+/2176e15afc8a82813c303e3001a02aad930246a2

Patch Set 1 #

Patch Set 2 : Reformat comments. #

Total comments: 2

Patch Set 3 : Fix indentation in the initializer. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -138 lines) Patch
M ios/chrome/browser/tabs/tab.h View 1 chunk +6 lines, -0 lines 0 comments Download
M ios/chrome/browser/tabs/tab.mm View 1 3 chunks +91 lines, -99 lines 0 comments Download
M ios/chrome/browser/tabs/tab_model_unittest.mm View 1 2 2 chunks +21 lines, -23 lines 0 comments Download
M ios/chrome/browser/tabs/tab_private.h View 1 chunk +0 lines, -6 lines 0 comments Download
M ios/chrome/browser/tabs/tab_unittest.mm View 1 chunk +6 lines, -10 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 26 (16 generated)
sdefresne
Please take a look.
3 years, 10 months ago (2017-02-07 17:38:18 UTC) #4
sdefresne
marq: FYI
3 years, 10 months ago (2017-02-07 17:42:01 UTC) #6
marq (ping after 24h)
https://codereview.chromium.org/2685653002/diff/20001/ios/chrome/browser/tabs/tab_model_unittest.mm File ios/chrome/browser/tabs/tab_model_unittest.mm (right): https://codereview.chromium.org/2685653002/diff/20001/ios/chrome/browser/tabs/tab_model_unittest.mm#newcode84 ios/chrome/browser/tabs/tab_model_unittest.mm:84: if ((self = [super initWithWebState:std::move(webStateImpl) Prefer to keep the ...
3 years, 10 months ago (2017-02-07 18:39:04 UTC) #11
sdefresne
https://codereview.chromium.org/2685653002/diff/20001/ios/chrome/browser/tabs/tab_model_unittest.mm File ios/chrome/browser/tabs/tab_model_unittest.mm (right): https://codereview.chromium.org/2685653002/diff/20001/ios/chrome/browser/tabs/tab_model_unittest.mm#newcode84 ios/chrome/browser/tabs/tab_model_unittest.mm:84: if ((self = [super initWithWebState:std::move(webStateImpl) On 2017/02/07 18:39:04, marq ...
3 years, 10 months ago (2017-02-08 09:28:58 UTC) #14
rohitrao (ping after 24h)
Why does attaching tab helpers fail in the tests? It looks like you have a ...
3 years, 10 months ago (2017-02-08 13:00:52 UTC) #17
sdefresne
On 2017/02/08 13:00:52, rohitrao wrote: > Why does attaching tab helpers fail in the tests? ...
3 years, 10 months ago (2017-02-08 13:40:35 UTC) #18
rohitrao (ping after 24h)
lgtm, thanks for the explanation Longer term, we'll want to move helper creation out of ...
3 years, 10 months ago (2017-02-08 13:46:33 UTC) #19
sdefresne
On 2017/02/08 13:46:33, rohitrao wrote: > lgtm, thanks for the explanation > > Longer term, ...
3 years, 10 months ago (2017-02-08 13:52:07 UTC) #20
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/2685653002/40001
3 years, 10 months ago (2017-02-08 14:54:50 UTC) #23
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 14:58:59 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/2176e15afc8a82813c303e3001a0...

Powered by Google App Engine
This is Rietveld 408576698