New issue
Advanced search Search tips

Issue 719551 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

HandleJavaScriptDialog not correct for new dialogs

Project Member Reported by a...@chromium.org, May 8 2017

Issue description

Comment 1 by a...@chromium.org, May 8 2017

Specifically, the new dialogs do not do HandleJavaScriptDialog correctly; they improperly return a blank string when no override is specified rather than the string in the input box of prompt dialogs.

Comment 2 by a...@chromium.org, May 8 2017

Labels: Merge-Request-59 M-59

Comment 3 by a...@chromium.org, May 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b38dc9a7d0f5457f892a031b407f0346b666430d

commit b38dc9a7d0f5457f892a031b407f0346b666430d
Author: avi <avi@chromium.org>
Date: Mon May 08 16:55:07 2017

Fix HandleJavaScriptDialog.

The new dialogs had a bug where they misinterpreted a null pointer in HandleJavaScriptDialog as a request to return an empty string rather than the contents in the dialog.

Turning on the new dialogs for trunk revealed this on the Chromedriver bots, but there was no test coverage in Chromium proper to catch this.

This change adds testing for HandleJavaScriptDialog in the Chromium repo, and fixes the bug.

BUG= chromedriver:1792 ,  719551 
TEST=re-enabled chromedriver test, new JavaScriptDialogTest.HandleJavaScriptDialog

Review-Url: https://codereview.chromium.org/2867613002
Cr-Commit-Position: refs/heads/master@{#470020}

[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog.h
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog_browsertest.cc
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.h
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.mm
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.cc
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h
[modify] https://crrev.com/b38dc9a7d0f5457f892a031b407f0346b666430d/chrome/test/chromedriver/test/test_expectations

Comment 4 by a...@chromium.org, May 8 2017

Status: Fixed (was: Started)
Project Member

Comment 5 by sheriffbot@chromium.org, May 9 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Can you please merge this to 3071 ASAP to make it to beta release tomorrow? Our RC will be cut at 4pm. 

Comment 7 by a...@chromium.org, May 9 2017

I did the merge; eventually the bot will note it here.

Comment 8 by a...@chromium.org, May 10 2017

Labels: -Merge-Approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/969884aef39470a86a9f40a6dca712becab6b51b

commit 969884aef39470a86a9f40a6dca712becab6b51b
Author: Avi Drissman <avi@chromium.org>
Date: Tue May 09 23:40:25 2017

Fix HandleJavaScriptDialog.

The new dialogs had a bug where they misinterpreted a null pointer in HandleJavaScriptDialog as a request to return an empty string rather than the contents in the dialog.

Turning on the new dialogs for trunk revealed this on the Chromedriver bots, but there was no test coverage in Chromium proper to catch this.

This change adds testing for HandleJavaScriptDialog in the Chromium repo, and fixes the bug.

BUG=  chromedriver:1792  , 719551
TEST=re-enabled chromedriver test, new JavaScriptDialogTest.HandleJavaScriptDialog

Review-Url: https://codereview.chromium.org/2867613002
Cr-Commit-Position: refs/heads/master@{#470020}
(cherry picked from commit b38dc9a7d0f5457f892a031b407f0346b666430d)

Review-Url: https://codereview.chromium.org/2875473002 .
Cr-Commit-Position: refs/branch-heads/3071@{#492}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog.h
[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog_browsertest.cc
[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.h
[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.mm
[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.cc
[modify] https://crrev.com/969884aef39470a86a9f40a6dca712becab6b51b/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h

Sign in to add a comment