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

Issue 26540004: Return blank strings for Views Combobox separator items. (Closed)

Created:
7 years, 2 months ago by msw
Modified:
7 years, 2 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Return blank strings for Views Combobox separator items. Prevents a DCHECK cited in the bug and follows good practice. (don't ask ComboboxModel impls for separator item names) Add a unit test that fails without the above change. BUG=308666 TEST=No DCHECK on debug build for typing "other" then "book" in bookmark bubble folder combobox. R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=229550

Patch Set 1 #

Patch Set 2 : Add a unit test. #

Total comments: 2

Patch Set 3 : Refine test item strings and enforcement. #

Total comments: 2

Patch Set 4 : Print the row number with test expectation failures. #

Patch Set 5 : Upload again to kick the CQ. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -2 lines) Patch
M ui/views/controls/combobox/combobox.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/combobox/combobox_unittest.cc View 1 2 3 2 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
msw
Hey Scott, please take a look; thanks!
7 years, 2 months ago (2013-10-17 20:23:07 UTC) #1
sky
https://codereview.chromium.org/26540004/diff/6001/ui/views/controls/combobox/combobox_unittest.cc File ui/views/controls/combobox/combobox_unittest.cc (right): https://codereview.chromium.org/26540004/diff/6001/ui/views/controls/combobox/combobox_unittest.cc#newcode319 ui/views/controls/combobox/combobox_unittest.cc:319: EXPECT_TRUE(combobox_->GetTextForRow(i).empty()); Would be nice if the model here returned ...
7 years, 2 months ago (2013-10-17 20:58:54 UTC) #2
msw
Hope that's better. Please take another look, thanks! https://codereview.chromium.org/26540004/diff/6001/ui/views/controls/combobox/combobox_unittest.cc File ui/views/controls/combobox/combobox_unittest.cc (right): https://codereview.chromium.org/26540004/diff/6001/ui/views/controls/combobox/combobox_unittest.cc#newcode319 ui/views/controls/combobox/combobox_unittest.cc:319: EXPECT_TRUE(combobox_->GetTextForRow(i).empty()); ...
7 years, 2 months ago (2013-10-17 21:25:46 UTC) #3
sky
Much, thanks. LGTM https://codereview.chromium.org/26540004/diff/18001/ui/views/controls/combobox/combobox_unittest.cc File ui/views/controls/combobox/combobox_unittest.cc (right): https://codereview.chromium.org/26540004/diff/18001/ui/views/controls/combobox/combobox_unittest.cc#newcode320 ui/views/controls/combobox/combobox_unittest.cc:320: EXPECT_TRUE(combobox_->GetTextForRow(i).empty()); For loops like this it's ...
7 years, 2 months ago (2013-10-18 00:35:24 UTC) #4
msw
Comment addressed; landing. https://codereview.chromium.org/26540004/diff/18001/ui/views/controls/combobox/combobox_unittest.cc File ui/views/controls/combobox/combobox_unittest.cc (right): https://codereview.chromium.org/26540004/diff/18001/ui/views/controls/combobox/combobox_unittest.cc#newcode320 ui/views/controls/combobox/combobox_unittest.cc:320: EXPECT_TRUE(combobox_->GetTextForRow(i).empty()); On 2013/10/18 00:35:24, sky wrote: ...
7 years, 2 months ago (2013-10-18 01:07:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/26540004/46001
7 years, 2 months ago (2013-10-18 01:15:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/26540004/46001
7 years, 2 months ago (2013-10-18 01:26:17 UTC) #7
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 2 months ago (2013-10-18 02:04:26 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/26540004/46001
7 years, 2 months ago (2013-10-18 04:56:22 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/26540004/408001
7 years, 2 months ago (2013-10-18 20:36:33 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/26540004/408001
7 years, 2 months ago (2013-10-18 21:11:38 UTC) #11
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) app_list_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=90489
7 years, 2 months ago (2013-10-19 02:14:22 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/26540004/408001
7 years, 2 months ago (2013-10-19 04:37:38 UTC) #13
commit-bot: I haz the power
7 years, 2 months ago (2013-10-19 13:43:10 UTC) #14
Message was sent while issue was closed.
Change committed as 229550

Powered by Google App Engine
This is Rietveld 408576698