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

Issue 11040055: Adds a FakeToolbarModel for use in testing. (Closed)

Created:
8 years, 2 months ago by lliabraa
Modified:
8 years, 2 months ago
Reviewers:
sky
CC:
chromium-reviews, rohitrao (ping after 24h), stuartmorgan
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Adds a FakeToolbarModel for use in testing. The ToolbarModel's dependencies make it hard to include in unit tests. This simple fake is created with some default values which can be changed via the setters. BUG=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161407

Patch Set 1 #

Total comments: 14

Patch Set 2 : added ToolbarModelImpl and addressed review comments #

Patch Set 3 : remove unnecessary forward declaration #

Total comments: 18

Patch Set 4 : renamed methods and fixed usage #

Total comments: 4

Patch Set 5 : git try #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -312 lines) Patch
M chrome/browser/chromeos/login/simple_web_view_dialog.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 6 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 3 7 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/search/toolbar_search_animator.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/ui/toolbar/test_toolbar_model.h View 1 2 3 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/browser/ui/toolbar/test_toolbar_model.cc View 1 2 3 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model.h View 1 2 3 4 4 chunks +13 lines, -42 lines 0 comments Download
D chrome/browser/ui/toolbar/toolbar_model.cc View 1 2 3 4 1 chunk +0 lines, -225 lines 0 comments Download
A chrome/browser/ui/toolbar/toolbar_model_impl.h View 1 2 3 4 1 chunk +72 lines, -0 lines 0 comments Download
A + chrome/browser/ui/toolbar/toolbar_model_impl.cc View 1 2 3 4 12 chunks +27 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 5 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/location_bar/zoom_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar_view.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
lliabraa
8 years, 2 months ago (2012-10-05 13:51:04 UTC) #1
sky
If we're going to do this ToolbarModel should be pure virtual otherwise folks are going ...
8 years, 2 months ago (2012-10-05 16:41:22 UTC) #2
lliabraa
I've moved the implementation to an Impl class and replaced all instantiations of ToolbarModel with ...
8 years, 2 months ago (2012-10-09 19:29:35 UTC) #3
sky
https://chromiumcodereview.appspot.com/11040055/diff/8003/chrome/browser/ui/toolbar/fake_toolbar_model.cc File chrome/browser/ui/toolbar/fake_toolbar_model.cc (right): https://chromiumcodereview.appspot.com/11040055/diff/8003/chrome/browser/ui/toolbar/fake_toolbar_model.cc#newcode7 chrome/browser/ui/toolbar/fake_toolbar_model.cc:7: #include "base/utf_string_conversions.h" Do you really need this? https://chromiumcodereview.appspot.com/11040055/diff/8003/chrome/browser/ui/toolbar/fake_toolbar_model.cc#newcode11 chrome/browser/ui/toolbar/fake_toolbar_model.cc:11: ...
8 years, 2 months ago (2012-10-09 20:07:13 UTC) #4
lliabraa
Thanks for the review - this is ready for another look. https://chromiumcodereview.appspot.com/11040055/diff/8003/chrome/browser/ui/toolbar/fake_toolbar_model.cc File chrome/browser/ui/toolbar/fake_toolbar_model.cc (right): ...
8 years, 2 months ago (2012-10-10 19:39:33 UTC) #5
sky
https://chromiumcodereview.appspot.com/11040055/diff/21002/chrome/browser/ui/toolbar/toolbar_model.h File chrome/browser/ui/toolbar/toolbar_model.h (right): https://chromiumcodereview.appspot.com/11040055/diff/21002/chrome/browser/ui/toolbar/toolbar_model.h#newcode76 chrome/browser/ui/toolbar/toolbar_model.h:76: static string16 GetEVCertName(const net::X509Certificate& cert); Is there a reason ...
8 years, 2 months ago (2012-10-10 21:17:36 UTC) #6
lliabraa
qq https://chromiumcodereview.appspot.com/11040055/diff/21002/chrome/browser/ui/toolbar/toolbar_model.h File chrome/browser/ui/toolbar/toolbar_model.h (right): https://chromiumcodereview.appspot.com/11040055/diff/21002/chrome/browser/ui/toolbar/toolbar_model.h#newcode76 chrome/browser/ui/toolbar/toolbar_model.h:76: static string16 GetEVCertName(const net::X509Certificate& cert); On 2012/10/10 21:17:36, ...
8 years, 2 months ago (2012-10-11 13:03:00 UTC) #7
sky
On Thu, Oct 11, 2012 at 6:03 AM, <lliabraa@chromium.org> wrote: > qq > > > ...
8 years, 2 months ago (2012-10-11 17:18:24 UTC) #8
lliabraa
PTAL https://chromiumcodereview.appspot.com/11040055/diff/21002/chrome/browser/ui/toolbar/toolbar_model_impl.h File chrome/browser/ui/toolbar/toolbar_model_impl.h (right): https://chromiumcodereview.appspot.com/11040055/diff/21002/chrome/browser/ui/toolbar/toolbar_model_impl.h#newcode35 chrome/browser/ui/toolbar/toolbar_model_impl.h:35: // Returns the text for the current page's ...
8 years, 2 months ago (2012-10-11 18:14:59 UTC) #9
sky
LGTM
8 years, 2 months ago (2012-10-11 19:20:44 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lliabraa@chromium.org/11040055/19006
8 years, 2 months ago (2012-10-11 19:29:02 UTC) #11
commit-bot: I haz the power
8 years, 2 months ago (2012-10-11 21:32:43 UTC) #12
Change committed as 161407

Powered by Google App Engine
This is Rietveld 408576698