|
|
DescriptionBackfill some UI tests.
* Added a test for DialogClientView's button layout.
* Added a test for non client hit results in BubbleFrameView.
* Added a test for ValidationMessageBubbleView's anchor rect at HighDPI.
BUG=702196, 680019
Review-Url: https://codereview.chromium.org/2861533003
Cr-Original-Commit-Position: refs/heads/master@{#472550}
Committed: https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e765a55f95a4b
Review-Url: https://codereview.chromium.org/2861533003
Cr-Commit-Position: refs/heads/master@{#472923}
Committed: https://chromium.googlesource.com/chromium/src/+/ea63253fa4fdcf6db310bff500e72a8aac4ae8f9
Patch Set 1 #Patch Set 2 : try to fix bots #Patch Set 3 : rewrite hit test in dialog tests #Patch Set 4 : minor edits #
Total comments: 8
Patch Set 5 : comments #
Total comments: 7
Patch Set 6 : test rwhv makes its own window #
Total comments: 2
Patch Set 7 : change window delegate plumbing #Patch Set 8 : fix compile #Patch Set 9 : fix compile, but for real #Patch Set 10 : fix silent merge conflict #
Messages
Total messages: 58 (40 generated)
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=716222,702196,680019 ========== to ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 ==========
bsep@chromium.org changed reviewers: + sky@chromium.org
https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... File chrome/browser/ui/views/DEPS (right): https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/DEPS:13: "+content/test/test_render_view_host.h", Code outside of content should only use code in content/public. https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... File chrome/browser/ui/views/validation_message_bubble_view_unittest.cc (right): https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:44: ValidationMessageBubbleView& bubble() const { return *bubble_; } Either make this return a const ValidationMessageButton&, or don't make the function const. https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:47: views::LayoutProvider provider; // Creates a singleton. Add trailing '_'. https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:49: }; DISALLOW...
https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... File chrome/browser/ui/views/DEPS (right): https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/DEPS:13: "+content/test/test_render_view_host.h", On 2017/05/05 14:43:21, sky wrote: > Code outside of content should only use code in content/public. Changed the set_native_view call in RenderViewHostTestHarness::SetUp, since TestRenderWidgetHostView needs root_window from aura::test::AuraTestHelper and I don't see any other way to get at it. https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... File chrome/browser/ui/views/validation_message_bubble_view_unittest.cc (right): https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:44: ValidationMessageBubbleView& bubble() const { return *bubble_; } On 2017/05/05 14:43:21, sky wrote: > Either make this return a const ValidationMessageButton&, or don't make the > function const. Done. https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:47: views::LayoutProvider provider; // Creates a singleton. On 2017/05/05 14:43:22, sky wrote: > Add trailing '_'. Done. https://codereview.chromium.org/2861533003/diff/60001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:49: }; On 2017/05/05 14:43:21, sky wrote: > DISALLOW... Done.
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... File chrome/browser/ui/views/validation_message_bubble_view_unittest.cc (right): https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:29: switches::kForceDeviceScaleFactor, std::to_string(kScaleFactor)); Wow, I didn't realize std got a std::to_string function in c++11. Nice! https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:33: // Owned by the parent view. This comment is mildly confusing given there is no parent here, and actually ValidationMessageBubbleView manages it's own lifetime, which is handled in DialogDelegateView. https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:54: const gfx::Rect updated_anchor_rect(66, 99, 44, 33); Add comment as to where these values come from. https://codereview.chromium.org/2861533003/diff/80001/content/public/test/tes... File content/public/test/test_renderer_host.cc (right): https://codereview.chromium.org/2861533003/diff/80001/content/public/test/tes... content/public/test/test_renderer_host.cc:287: ->set_native_view(aura_test_helper_->root_window()); This is confusing as you're setting the aura::Window created by AuraTestHelper as the native view of the RenderWidgetHostView. My initial reaction is doing that is confusing and easily misused. What about creating an aura::Window and having TestRenderViewHost own it? You could parent the window to AuraTestHelper's window if necessary.
https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... File chrome/browser/ui/views/validation_message_bubble_view_unittest.cc (right): https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:33: // Owned by the parent view. On 2017/05/07 22:44:23, sky wrote: > This comment is mildly confusing given there is no parent here, and actually > ValidationMessageBubbleView manages it's own lifetime, which is handled in > DialogDelegateView. You're right. I thought the NativeView shenanigans were required because that was the owner, but I guess not. I deleted the comment since the owner is clearly not the test anyway. https://codereview.chromium.org/2861533003/diff/80001/chrome/browser/ui/views... chrome/browser/ui/views/validation_message_bubble_view_unittest.cc:54: const gfx::Rect updated_anchor_rect(66, 99, 44, 33); On 2017/05/07 22:44:23, sky wrote: > Add comment as to where these values come from. They're just arbitrary test values. I made them slightly less goofy so hopefully that's clearer. https://codereview.chromium.org/2861533003/diff/80001/content/public/test/tes... File content/public/test/test_renderer_host.cc (right): https://codereview.chromium.org/2861533003/diff/80001/content/public/test/tes... content/public/test/test_renderer_host.cc:287: ->set_native_view(aura_test_helper_->root_window()); On 2017/05/07 22:44:23, sky wrote: > This is confusing as you're setting the aura::Window created by AuraTestHelper > as the native view of the RenderWidgetHostView. My initial reaction is doing > that is confusing and easily misused. What about creating an aura::Window and > having TestRenderViewHost own it? You could parent the window to > AuraTestHelper's window if necessary. Okay I made TestRenderWidgetHostView a WindowDelegate and it creates its own Window, and that works. I guess it's not important that the Window actually does anything, just that it exists.
https://codereview.chromium.org/2861533003/diff/100001/content/test/test_rend... File content/test/test_render_view_host.cc (right): https://codereview.chromium.org/2861533003/diff/100001/content/test/test_rend... content/test/test_render_view_host.cc:65: window_(new aura::Window(this)) { Call window_->set_owned_by_parent(false). That way if test code ends up parenting the window the window won't be unexpectedly deleted. Could you also use TestWindowDelegate (ui/aura/test/test_window_delegate.h) as the delegate? That way less code to update as WindowDelegate changes, and you don't really TestRenderWidgetHostview to be the delegate. Using TestWindowDelegate should also mean you can put the window_ in a unique_ptr (use TestWindowDelegate::CreateSelfDestroyingDelegate() so that TestWindowDelegate deletes itself when the window is deleted).
https://codereview.chromium.org/2861533003/diff/100001/content/test/test_rend... File content/test/test_render_view_host.cc (right): https://codereview.chromium.org/2861533003/diff/100001/content/test/test_rend... content/test/test_render_view_host.cc:65: window_(new aura::Window(this)) { On 2017/05/10 15:49:50, sky wrote: > Call window_->set_owned_by_parent(false). That way if test code ends up > parenting the window the window won't be unexpectedly deleted. > > Could you also use TestWindowDelegate (ui/aura/test/test_window_delegate.h) as > the delegate? That way less code to update as WindowDelegate changes, and you > don't really TestRenderWidgetHostview to be the delegate. Using > TestWindowDelegate should also mean you can put the window_ in a unique_ptr (use > TestWindowDelegate::CreateSelfDestroyingDelegate() so that TestWindowDelegate > deletes itself when the window is deleted). All done.
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by bsep@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
ping
LGTM - sorry for missing the review. Please ping after a day if you don't get a response.
The CQ bit was checked by bsep@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 160001, "attempt_start_ts": 1495046329258930, "parent_rev": "753970e38dce9e1bdb45fbf87abb668684f8de5d", "commit_rev": "819580022f1d2c8dc1eaa4d8614e765a55f95a4b"}
Message was sent while issue was closed.
Description was changed from ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 ========== to ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 Review-Url: https://codereview.chromium.org/2861533003 Cr-Commit-Position: refs/heads/master@{#472550} Committed: https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e... ==========
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e...
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2891803002/ by bsep@chromium.org. The reason for reverting is: Caused compile failure.
Message was sent while issue was closed.
Findit (https://goo.gl/kROfz5) confirmed this CL at revision 472550 as the culprit for failures in the build cycles as shown on: https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3Itb...
Message was sent while issue was closed.
Description was changed from ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 Review-Url: https://codereview.chromium.org/2861533003 Cr-Commit-Position: refs/heads/master@{#472550} Committed: https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e... ========== to ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 Review-Url: https://codereview.chromium.org/2861533003 Cr-Commit-Position: refs/heads/master@{#472550} Committed: https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e... ==========
Re-landing with the incompatible changes fixed.
The CQ bit was checked by bsep@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sky@chromium.org Link to the patchset: https://codereview.chromium.org/2861533003/#ps180001 (title: "fix silent merge conflict")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by bsep@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 180001, "attempt_start_ts": 1495132837068060, "parent_rev": "2e7f59c3bbe5f9d805080883140d348acca581f1", "commit_rev": "ea63253fa4fdcf6db310bff500e72a8aac4ae8f9"}
Message was sent while issue was closed.
Description was changed from ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 Review-Url: https://codereview.chromium.org/2861533003 Cr-Commit-Position: refs/heads/master@{#472550} Committed: https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e... ========== to ========== Backfill some UI tests. * Added a test for DialogClientView's button layout. * Added a test for non client hit results in BubbleFrameView. * Added a test for ValidationMessageBubbleView's anchor rect at HighDPI. BUG=702196,680019 Review-Url: https://codereview.chromium.org/2861533003 Cr-Original-Commit-Position: refs/heads/master@{#472550} Committed: https://chromium.googlesource.com/chromium/src/+/819580022f1d2c8dc1eaa4d8614e... Review-Url: https://codereview.chromium.org/2861533003 Cr-Commit-Position: refs/heads/master@{#472923} Committed: https://chromium.googlesource.com/chromium/src/+/ea63253fa4fdcf6db310bff500e7... ==========
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/ea63253fa4fdcf6db310bff500e7... |