|
|
Created:
6 years, 2 months ago by yawano Modified:
5 years, 8 months ago Reviewers:
Dan Beam CC:
chromium-reviews, oshima+watch_chromium.org, yoshiki, Haruki Sato Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFixed to return original context element.
BUG=423248
TEST=out/Release/browser_tests --gtest_filter=WebUIResourceBrowserTest.ContextMenuHandlerTest
Committed: https://crrev.com/4830c50b38bcb3b5c2144b7d85fb34ab7f985270
Cr-Commit-Position: refs/heads/master@{#327004}
Patch Set 1 #Patch Set 2 : Added test case. #Patch Set 3 : nit. #Patch Set 4 : Changed to use event.type directly. #
Total comments: 4
Patch Set 5 : Fixed variable names and comments. #Patch Set 6 : Rebase #Patch Set 7 : Added log to debug the failed test case. #Patch Set 8 : Fixed a test case which fails on Windows. #Patch Set 9 : Rebase. #Patch Set 10 : Rebase again. #
Total comments: 1
Patch Set 11 : Rebase. #Patch Set 12 : Remove setTimeout from test code. #
Total comments: 6
Patch Set 13 : Address comments. #
Messages
Total messages: 48 (19 generated)
yawano@chromium.org changed reviewers: + dbeam@chromium.org
PTAL.
lgtm, but you'd get more points if you wrote a test in the style of chrome/test/data/webui/*_test.html (you'll have to add your test to webui_resource_browsertest.cc as well)
Thank you for the review. I added a test case for this patch. PTAL.
lgtm, yawano++ https://codereview.chromium.org/647483006/diff/60001/chrome/test/data/webui/c... File chrome/test/data/webui/context_menu_handler_test.html (right): https://codereview.chromium.org/647483006/diff/60001/chrome/test/data/webui/c... chrome/test/data/webui/context_menu_handler_test.html:7: var cm = cr.ui.contextMenuHandler; nit: cmh https://codereview.chromium.org/647483006/diff/60001/chrome/test/data/webui/c... chrome/test/data/webui/context_menu_handler_test.html:9: // Create context menu nit: end comments with .
Thanks for the review. https://codereview.chromium.org/647483006/diff/60001/chrome/test/data/webui/c... File chrome/test/data/webui/context_menu_handler_test.html (right): https://codereview.chromium.org/647483006/diff/60001/chrome/test/data/webui/c... chrome/test/data/webui/context_menu_handler_test.html:7: var cm = cr.ui.contextMenuHandler; On 2014/10/15 03:09:40, Dan Beam wrote: > nit: cmh Done. https://codereview.chromium.org/647483006/diff/60001/chrome/test/data/webui/c... chrome/test/data/webui/context_menu_handler_test.html:9: // Create context menu On 2014/10/15 03:09:41, Dan Beam wrote: > nit: end comments with . Done.
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/80001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/...) android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...) linux_chromium_compile_dbg_32 on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_gn_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/80001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...) linux_chromium_compile_dbg_32 on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/80001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/...) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/69247) android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...) android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_d...) chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_32 on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator...) ios_rel_device on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device/bu...) ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...) mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...) win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...) win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by yawano@chromium.org
The CQ bit was unchecked by yawano@chromium.org
The CQ bit was checked by yawano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/120001
The CQ bit was unchecked by yawano@chromium.org
On 2014/10/17 05:03:45, I haz the power (commit-bot) wrote: > CQ is trying da patch. Follow status at > https://chromium-cq-status.appspot.com/patch-status/647483006/120001 Note: Test case fails on win_chromium_(x64_)rel_swarming. I created another patch set to run tests on trybot in order to debug and fix the failed test cases. https://codereview.chromium.org/645033007
The test case has failed on Windows since we had to wait at least 50ms after we hide the context menu. I fixed the test case to pass the test. PTAL. Thanks. Reference: context_menu_handler.js line:93 https://code.google.com/p/chromium/codesearch#chromium/src/ui/webui/resources...
@dbeam: Could you take a look at this CL since I changed the code of the test case? Thanks! On 2014/10/27 01:11:36, yawano wrote: > The test case has failed on Windows since we had to wait at least 50ms after we > hide the context menu. I fixed the test case to pass the test. PTAL. Thanks. > > Reference: context_menu_handler.js line:93 > https://code.google.com/p/chromium/codesearch#chromium/src/ui/webui/resources...
https://codereview.chromium.org/647483006/diff/180001/chrome/test/data/webui/... File chrome/test/data/webui/context_menu_handler_test.html (right): https://codereview.chromium.org/647483006/diff/180001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:42: setTimeout(function() { this is almost never a good idea. please make this callback-based (i.e. either find a way to hook into existing code or write new code to ensure your environment is set up correctly rather than waiting a hopefully correct amount of time)
On 2014/10/29 01:17:17, Dan Beam wrote: > https://codereview.chromium.org/647483006/diff/180001/chrome/test/data/webui/... > File chrome/test/data/webui/context_menu_handler_test.html (right): > > https://codereview.chromium.org/647483006/diff/180001/chrome/test/data/webui/... > chrome/test/data/webui/context_menu_handler_test.html:42: setTimeout(function() > { > this is almost never a good idea. please make this callback-based (i.e. either > find a way to hook into existing code or write new code to ensure your > environment is set up correctly rather than waiting a hopefully correct amount > of time) @dbeam: Thank you for the review! I think it's better not to use time-based approach also in the implementation of context_menu_handler.js. I'm going to investigate it and find a way to fix it.
Sorry for asking review of very old CL. I changed not to use setTimeout in test code. PTAL. Thank you!
lgtm https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... File chrome/test/data/webui/context_menu_handler_test.html (right): https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:6: function testShowAndHideEvents() { var originalDateNow = Date.now; https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:30: var callbacks = []; nit: callbacks -> events https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:55: assertEquals(menu, callbacks[2].menu); Date.now = originalDateNow;
Thank you! https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... File chrome/test/data/webui/context_menu_handler_test.html (right): https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:6: function testShowAndHideEvents() { On 2015/04/22 18:15:59, Dan Beam wrote: > var originalDateNow = Date.now; Done. https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:30: var callbacks = []; On 2015/04/22 18:15:59, Dan Beam wrote: > nit: callbacks -> events Done. https://codereview.chromium.org/647483006/diff/220001/chrome/test/data/webui/... chrome/test/data/webui/context_menu_handler_test.html:55: assertEquals(menu, callbacks[2].menu); On 2015/04/22 18:15:59, Dan Beam wrote: > Date.now = originalDateNow; Done.
The CQ bit was checked by yawano@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dbeam@chromium.org Link to the patchset: https://codereview.chromium.org/647483006/#ps240001 (title: "Address comments.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/647483006/240001
Message was sent while issue was closed.
Committed patchset #13 (id:240001)
Message was sent while issue was closed.
Patchset 13 (id:??) landed as https://crrev.com/4830c50b38bcb3b5c2144b7d85fb34ab7f985270 Cr-Commit-Position: refs/heads/master@{#327004} |