diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-28 22:52:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-28 22:52:19 +0000 |
commit | bba9e63bdb8de860a20f2979c49cb814552d3ee3 (patch) | |
tree | 85fb36329ca1fa9dcbca6bbf8090ef80b1c7b466 /chrome/browser/ui/toolbar/toolbar_model_unittest.cc | |
parent | 28b6d3554a56f6611b74bad1e1baf24e38ec7070 (diff) | |
download | chromium_src-bba9e63bdb8de860a20f2979c49cb814552d3ee3.zip chromium_src-bba9e63bdb8de860a20f2979c49cb814552d3ee3.tar.gz chromium_src-bba9e63bdb8de860a20f2979c49cb814552d3ee3.tar.bz2 |
Misc. cleanup:
* Reduce indenting levels
* Align args per style guide
* Improve (or remove) comments
* Pass around TemplateURL*s where convenient and safe instead of converting
to/from keywords. This generally simplifies things slightly and will be
useful for subsequent changes that need the TemplateURL*s in more places.
* Don't handle DCHECK failure
* Nuke long-outdated disabled KeywordProvider unittest
* Attempt (and probably fail) to put SearchProvider::CreateSearchSuggestion()
args in some sort of order
* Remove using directives where they don't save lines
* Follow style guide class declaration order
* Use OVERRIDE
* Make function declaration and definition order match
* Shorten/simplify code
* Put all three IsGoogleXXX() functions that take URLs in one group
* Eliminate unnecessary #includes
* Add GetDefaultSearchURLForSearchTerms() function to c/b/search_engines/util.h
since many disparate callers want to do that (and in a subsequent change I'll
want to slightly modify how that works)
* Fix presubmit warning about mismatched braces
* Remove unnecessary ResetDefaultTemplateURL() calls from ToolbarModel tests
BUG=249197
TEST=none
R=cpu@chromium.org, jered@chromium.org
Review URL: https://codereview.chromium.org/18119005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/toolbar/toolbar_model_unittest.cc')
-rw-r--r-- | chrome/browser/ui/toolbar/toolbar_model_unittest.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc index 0f735a8..16292ec 100644 --- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc +++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc @@ -256,14 +256,11 @@ void ToolbarModelTest::NavigateAndCheckTextImpl(const GURL& url, TEST_F(ToolbarModelTest, ShouldDisplayURLQueryExtractionDisabled) { ASSERT_FALSE(chrome::IsQueryExtractionEnabled()) << "This test expects query extraction to be disabled."; - ResetDefaultTemplateURL(); AddTab(browser(), GURL(content::kAboutBlankURL)); for (size_t i = 0; i < arraysize(test_items); ++i) { const TestItem& test_item = test_items[i]; - NavigateAndCheckText(test_item.url, - test_item.expected_text, - test_item.expected_replace_text_inactive, - false, + NavigateAndCheckText(test_item.url, test_item.expected_text, + test_item.expected_replace_text_inactive, false, test_item.should_display); } } @@ -271,15 +268,12 @@ TEST_F(ToolbarModelTest, ShouldDisplayURLQueryExtractionDisabled) { // Test that we replace URLs when the query extraction API is enabled. TEST_F(ToolbarModelTest, ShouldDisplayURLQueryExtractionEnabled) { chrome::EnableInstantExtendedAPIForTesting(); - ResetDefaultTemplateURL(); AddTab(browser(), GURL(content::kAboutBlankURL)); for (size_t i = 0; i < arraysize(test_items); ++i) { const TestItem& test_item = test_items[i]; - NavigateAndCheckText(test_item.url, - test_item.expected_text, + NavigateAndCheckText(test_item.url, test_item.expected_text, test_item.expected_replace_text_active, - test_item.would_replace, - test_item.should_display); + test_item.would_replace, test_item.should_display); } } |