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

Issue 20388003: Reload Instant NTP and Instant-process tabs on search url change (Closed)

Created:
7 years, 5 months ago by Anuj
Modified:
7 years, 3 months ago
Reviewers:
samarth, sky, Jered, Anuj Sharma
CC:
chromium-reviews, cbentzel+watch_chromium.org, skanuj+watch_chromium.org, melevin+watch_chromium.org, tburkard+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, donnd+watch_chromium.org, mad+watch_chromium.org, dominich, gavinp+prer_chromium.org, dominich+watch_chromium.org, jfweitz+watch_chromium.org, David Black, samarth+watch_chromium.org, kmadhusu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reload Instant NTP and Instant-process tabs on search url change . Add a default impl of instant_service_observer. . Move pref change listener for default search provider to instant_service and pass to browser_instant_controller and instant_ntp_prerenderer via instant_service_observer. . Add a search-domain-check listener to instant_service in a similar manner. . Replaced ReloadStaleNTP, PreloadInstantNTP etc with ReloadInstantNTP . Introduce InstantUnitTestBase - InstantServiceTest and BrowserInstantControllerTest are subclasses. . InstantService Unit Test - Use a mock observer to verify the search provider change and google url update is triggered on observers. - Verify the prerendered NTP is reloaded. . BrowserInstantController Unit Test - Moved the tab reload test from interactive ui test to BrowserInstantControllerTest. R=jered@chromium.org, samarth@chromium.org TBR=sky@chromium.org BUG=254206 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225063

Patch Set 1 #

Total comments: 18

Patch Set 2 : Addressed comments, added test #

Patch Set 3 : Test related changes #

Patch Set 4 : Added ui and unit tests #

Total comments: 22

Patch Set 5 : Format and lint #

Total comments: 28

Patch Set 6 : Rebased and addressed comments #

Total comments: 24

Patch Set 7 : Addressed comments, added a test to address the bug #

Total comments: 34

Patch Set 8 : Addressed Jered's comments #

Patch Set 9 : Added OWNERS file change to cover the unittest file in the per-file rule #

Patch Set 10 : Rebased, merged #

Patch Set 11 : Exclude the instant unit tests from android builds #

Patch Set 12 : More gypi fixes #

Patch Set 13 : Fix unit test #

Patch Set 14 : Fix unit test to use HasObserver instead of ObserverList::size() #

Patch Set 15 : Try to make MSVC happy #

Patch Set 16 : MSVC fix #

Patch Set 17 : Fixed InstantNTPPrerendererTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -219 lines) Patch
M chrome/browser/search/instant_service.h View 1 2 3 4 5 6 5 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/search/instant_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +71 lines, -9 lines 0 comments Download
M chrome/browser/search/instant_service_observer.h View 1 2 3 4 5 6 1 chunk +10 lines, -2 lines 0 comments Download
A chrome/browser/search/instant_service_observer.cc View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/browser/search/instant_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +101 lines, -0 lines 0 comments Download
A chrome/browser/search/instant_unittest_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/search/instant_unittest_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +85 lines, -0 lines 0 comments Download
M chrome/browser/ui/OWNERS View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.h View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 2 3 4 5 6 7 8 9 5 chunks +14 lines, -28 lines 0 comments Download
A chrome/browser/ui/browser_instant_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +193 lines, -0 lines 0 comments Download
M chrome/browser/ui/search/instant_extended_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -115 lines 0 comments Download
M chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/search/instant_ntp_prerenderer.h View 1 2 3 4 5 6 3 chunks +10 lines, -11 lines 0 comments Download
M chrome/browser/ui/search/instant_ntp_prerenderer.cc View 1 2 3 4 5 6 6 chunks +23 lines, -24 lines 0 comments Download
M chrome/browser/ui/search/instant_ntp_prerenderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +15 lines, -13 lines 0 comments Download
M chrome/browser/ui/search/instant_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
Anuj
7 years, 5 months ago (2013-07-25 18:51:53 UTC) #1
Anuj
PTAL.
7 years, 5 months ago (2013-07-26 17:25:05 UTC) #2
samarth
https://codereview.chromium.org/20388003/diff/1/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/20388003/diff/1/chrome/browser/search/instant_service.cc#newcode115 chrome/browser/search/instant_service.cc:115: registrar_.Add(this, Move this up next to the other notification ...
7 years, 5 months ago (2013-07-26 23:33:14 UTC) #3
Anuj
I have added some instant_service unittest. Please take a look while I add more unit ...
7 years, 4 months ago (2013-07-31 07:16:17 UTC) #4
Anuj
Done with tests. PTAL.
7 years, 4 months ago (2013-08-01 23:20:05 UTC) #5
samarth
Looks good overall. Mostly nits and comments for the test code. Thanks for cleaning things ...
7 years, 4 months ago (2013-08-02 21:51:15 UTC) #6
Anuj
PTAL. Updated CL description. https://codereview.chromium.org/20388003/diff/21001/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/20388003/diff/21001/chrome/browser/search/instant_service.cc#newcode120 chrome/browser/search/instant_service.cc:120: AddObserver(ntp_prerenderer()); On 2013/08/02 21:51:15, samarth ...
7 years, 4 months ago (2013-08-09 07:22:00 UTC) #7
Anuj Sharma
Ping. On Aug 9, 2013 12:22 AM, <skanuj@chromium.org> wrote: > PTAL. Updated CL description. > ...
7 years, 4 months ago (2013-08-12 08:47:19 UTC) #8
samarth
Almost there. Thanks for your patience. Thanks, Samarth https://codereview.chromium.org/20388003/diff/37001/chrome/browser/search/instant_service_observer.h File chrome/browser/search/instant_service_observer.h (right): https://codereview.chromium.org/20388003/diff/37001/chrome/browser/search/instant_service_observer.h#newcode26 chrome/browser/search/instant_service_observer.h:26: // ...
7 years, 4 months ago (2013-08-12 19:07:28 UTC) #9
Anuj
PTAL. https://codereview.chromium.org/20388003/diff/37001/chrome/browser/search/instant_service_observer.h File chrome/browser/search/instant_service_observer.h (right): https://codereview.chromium.org/20388003/diff/37001/chrome/browser/search/instant_service_observer.h#newcode26 chrome/browser/search/instant_service_observer.h:26: // Indicates that the Google URL has changed ...
7 years, 4 months ago (2013-08-13 00:18:08 UTC) #10
samarth
lgtm with some nits (and one actual bug below). Thanks, Samarth https://codereview.chromium.org/20388003/diff/50001/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): ...
7 years, 4 months ago (2013-08-14 00:24:13 UTC) #11
Anuj
PTAL. https://codereview.chromium.org/20388003/diff/50001/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/20388003/diff/50001/chrome/browser/search/instant_service.cc#newcode228 chrome/browser/search/instant_service.cc:228: ntp_prerenderer_.Destroy(); On 2013/08/14 00:24:14, samarth wrote: > Init ...
7 years, 4 months ago (2013-08-14 06:38:56 UTC) #12
Jered
Mostly nits and some confusion about a few comments. https://codereview.chromium.org/20388003/diff/62001/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/20388003/diff/62001/chrome/browser/search/instant_service.cc#newcode428 chrome/browser/search/instant_service.cc:428: ...
7 years, 4 months ago (2013-08-16 00:13:23 UTC) #13
Anuj
PTAL https://codereview.chromium.org/20388003/diff/62001/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/20388003/diff/62001/chrome/browser/search/instant_service.cc#newcode428 chrome/browser/search/instant_service.cc:428: // See GoogleURLTracker::OnURLFetchComplete. On 2013/08/16 00:13:23, Jered wrote: ...
7 years, 4 months ago (2013-08-22 00:40:45 UTC) #14
Anuj
I decided to keep the test with the test definition format, as we actually need ...
7 years, 4 months ago (2013-08-22 01:52:08 UTC) #15
Anuj
Ping.
7 years, 3 months ago (2013-08-26 17:13:08 UTC) #16
samarth
Sorry, did not realize you were still waiting for me. SLGTM.
7 years, 3 months ago (2013-08-27 22:43:16 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/72001
7 years, 3 months ago (2013-08-28 01:58:44 UTC) #18
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=22694
7 years, 3 months ago (2013-08-28 03:39:10 UTC) #19
Anuj Sharma
Need OWNERS approval for chrome/browser/ui/browser_instant_controller_unittest.cc. Who can provide that? On Tue, Aug 27, 2013 at ...
7 years, 3 months ago (2013-08-28 05:15:04 UTC) #20
Anuj
Per discussion with Samarth, I am submitting this TBR=sky@, as the difference is just a ...
7 years, 3 months ago (2013-08-28 17:28:43 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/84001
7 years, 3 months ago (2013-08-28 17:43:32 UTC) #22
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/search/instant_extended_interactive_uitest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-08-28 17:43:41 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/90001
7 years, 3 months ago (2013-08-28 20:14:23 UTC) #24
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 3 months ago (2013-08-28 21:19:24 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/90001
7 years, 3 months ago (2013-08-28 21:39:54 UTC) #26
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-08-28 22:02:38 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/116001
7 years, 3 months ago (2013-08-29 00:42:06 UTC) #28
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=72699
7 years, 3 months ago (2013-08-29 01:35:12 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/135001
7 years, 3 months ago (2013-08-29 07:08:47 UTC) #30
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-08-29 08:04:20 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/151001
7 years, 3 months ago (2013-08-29 09:28:06 UTC) #32
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=72822
7 years, 3 months ago (2013-08-29 10:23:41 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/168001
7 years, 3 months ago (2013-08-29 18:04:55 UTC) #34
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-08-29 18:39:01 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/109001
7 years, 3 months ago (2013-08-29 22:01:20 UTC) #36
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=73043
7 years, 3 months ago (2013-08-29 22:51:01 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/199001
7 years, 3 months ago (2013-09-05 07:22:31 UTC) #38
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=74374
7 years, 3 months ago (2013-09-05 08:19:49 UTC) #39
Jered
On 2013/09/05 08:19:49, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years, 3 months ago (2013-09-17 16:57:25 UTC) #40
Anuj Sharma
Yes :( I couldn't figure out the test breakage. Will ping for help sometime today. ...
7 years, 3 months ago (2013-09-17 18:31:24 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/224001
7 years, 3 months ago (2013-09-24 01:04:27 UTC) #42
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=201604
7 years, 3 months ago (2013-09-24 07:07:37 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skanuj@chromium.org/20388003/224001
7 years, 3 months ago (2013-09-24 18:13:49 UTC) #44
commit-bot: I haz the power
7 years, 3 months ago (2013-09-24 21:33:44 UTC) #45
Message was sent while issue was closed.
Change committed as 225063

Powered by Google App Engine
This is Rietveld 408576698