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

Issue 8298005: Fixes bug in instant where we would end up incorrectly using the (Closed)

Created:
9 years, 2 months ago by sky
Modified:
9 years, 2 months ago
CC:
chromium-reviews, jennb, kkania, Dmitry Titov, dcheng, prasadt, robertshield, jianli, Paweł Hajdan Jr., James Su
Visibility:
Public.

Description

Fixes bug in instant where we would end up incorrectly using the preview when we shouldn't. Here's the sequence that would trigger it: 1. focus the omnibox (which triggers loading the InstantLoader). 2. Type in a string that'll autocomplete to a url. 3. Arrow over a search suggestion to a non-search entry. 4. Press enter. When you arrow over a non-search we'll hide (what was DestroyPreviewContentsAndLeaveActive) the preview. But if between steps 3 and 4 we get a response back from the page with suggestions we'll set displayable_ to true and think everything is up to date. This leads to IsCurrent returning true when it isn't. To fix this I've nuked is_active(), which was a bit confusing anyway and added is_out_date_ (still confusing, but at least it's private). BUG=100368 TEST=covered by test, see bug for test scenario. R=sreeram@chromium.org,ben@chromium.org TBR=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105664

Patch Set 1 #

Total comments: 1

Patch Set 2 : Tweaks #

Total comments: 7

Patch Set 3 : Incorporate review feedback #

Patch Set 4 : Tweak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -67 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/instant/instant_browsertest.cc View 1 2 21 chunks +56 lines, -21 lines 0 comments Download
M chrome/browser/instant/instant_controller.h View 1 3 chunks +12 lines, -13 lines 0 comments Download
M chrome/browser/instant/instant_controller.cc View 1 2 3 8 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/instant/instant_delegate.h View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/browser.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_window.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/panels/panel.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/panels/panel.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/test_browser_window.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
sky
http://codereview.chromium.org/8298005/diff/1/chrome/browser/instant/instant_browsertest.cc File chrome/browser/instant/instant_browsertest.cc (right): http://codereview.chromium.org/8298005/diff/1/chrome/browser/instant/instant_browsertest.cc#newcode629 chrome/browser/instant/instant_browsertest.cc:629: EXPECT_FALSE(HasPreview()); HasPreview isn't exactly the same as is_active, which ...
9 years, 2 months ago (2011-10-14 18:13:06 UTC) #1
sreeram
http://codereview.chromium.org/8298005/diff/2001/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/8298005/diff/2001/chrome/browser/automation/testing_automation_provider.cc#newcode3540 chrome/browser/automation/testing_automation_provider.cc:3540: info->SetBoolean("active", (instant->GetPreviewContents() != NULL)); This is only used by ...
9 years, 2 months ago (2011-10-14 20:07:32 UTC) #2
sky
Addressed all issues. New patch uploaded. -Scott http://codereview.chromium.org/8298005/diff/2001/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/8298005/diff/2001/chrome/browser/automation/testing_automation_provider.cc#newcode3540 chrome/browser/automation/testing_automation_provider.cc:3540: info->SetBoolean("active", (instant->GetPreviewContents() ...
9 years, 2 months ago (2011-10-14 20:36:34 UTC) #3
sreeram
lgtm
9 years, 2 months ago (2011-10-14 20:47:45 UTC) #4
sky
9 years, 2 months ago (2011-10-14 23:39:44 UTC) #5
Ben, I'm TBRing the browser/browser_window related changes. A param passed to
BrowserWindow::HideInstant wasn't used, so I removed it hence all the changes.
Don't feel you have to look.

  -Scott

Powered by Google App Engine
This is Rietveld 408576698