Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use EvalJS without EXECUTE_SCRIPT_USE_MANUAL_REPLY #18754

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

cdesouza-chromium
Copy link
Collaborator

This PR changes the use of EvalJs in a similar fashion done upstream, removing on the uses of content::EXECUTE_SCRIPT_USE_MANUAL_REPLY, and modifying the scripts used in tests to return values directly, rather than relying on domAutomationController to transmit back results, which can be finicky.

With the new approach, values are returned through promises, or directly as a return value.

Resolves

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

This PR changes the use of EvalJs in a similar fashion done upstream,
removing on the uses of `content::EXECUTE_SCRIPT_USE_MANUAL_REPLY`, and
modifying the scripts used in tests to return values directly, rather
than relying on `domAutomationController` to transmit back results,
which can be finicky.

With the new approach, values are returned through promises, or directly
as a return value.
@cdesouza-chromium cdesouza-chromium force-pushed the use-eval-js-without-automation-controller branch from 186d3b1 to bf2db3b Compare June 9, 2023 17:05
@cdesouza-chromium cdesouza-chromium marked this pull request as ready for review June 12, 2023 16:07
@cdesouza-chromium cdesouza-chromium requested a review from a team as a code owner June 12, 2023 16:07
Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wallet core ++

@cdesouza-chromium cdesouza-chromium merged commit 6f5b8bb into master Jun 12, 2023
@cdesouza-chromium cdesouza-chromium deleted the use-eval-js-without-automation-controller branch June 12, 2023 18:58
@github-actions github-actions bot added this to the 1.54.x - Nightly milestone Jun 12, 2023
emerick pushed a commit that referenced this pull request Jun 20, 2023
This PR changes the use of EvalJs in a similar fashion done upstream,
removing on the uses of `content::EXECUTE_SCRIPT_USE_MANUAL_REPLY`, and
modifying the scripts used in tests to return values directly, rather
than relying on `domAutomationController` to transmit back results,
which can be finicky.

With the new approach, values are returned through promises, or directly
as a return value.
emerick pushed a commit that referenced this pull request Jun 20, 2023
This PR changes the use of EvalJs in a similar fashion done upstream,
removing on the uses of `content::EXECUTE_SCRIPT_USE_MANUAL_REPLY`, and
modifying the scripts used in tests to return values directly, rather
than relying on `domAutomationController` to transmit back results,
which can be finicky.

With the new approach, values are returned through promises, or directly
as a return value.
kjozwiak pushed a commit that referenced this pull request Jun 23, 2023
* Merge pull request #18388 from brave/cr115

Upgrade from Chromium 114 to Chromium 115

* [CodeHealth] Removing `base::Value` `Find*Path` uses

This PR removes the use of deprecated base::Value functions that are set
to be deleted upstream, namely FindPath, and its companions.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/99a884ced145f4086403439df9dc4bb21a406077

commit 99a884ced145f4086403439df9dc4bb21a406077
Author: Andrew Rayskiy <greengrape@google.com>
Date:   Tue May 16 08:50:44 2023 +0000

    [CodeHealth] Remove FindPath() from base/values.{h,cc}

    R=dcheng@chromium.org

    Bug: 1439196

* base::Value::FindBoolKey removed upstream

Chromium change:
https://chromium.googlesource.com/chromium/src/+/0fc824ae4dfcc4ab4f60cf4be99a50fe5fb4b984

commit 0fc824ae4dfcc4ab4f60cf4be99a50fe5fb4b984
Author: Matthew Riley <mattdr@google.com>
Date:   Tue May 9 23:37:26 2023 +0000

    Remove FindBoolKey

    All uses have been removed

    Bug: 1187001

* Use EvalJS without `EXECUTE_SCRIPT_USE_MANUAL_REPLY` (#18754)

This PR changes the use of EvalJs in a similar fashion done upstream,
removing on the uses of `content::EXECUTE_SCRIPT_USE_MANUAL_REPLY`, and
modifying the scripts used in tests to return values directly, rather
than relying on `domAutomationController` to transmit back results,
which can be finicky.

With the new approach, values are returned through promises, or directly
as a return value.

* Merge pull request #18970 from brave/cr115-followup-create-new-profile-button-colors

Import polymer_overriding.js to get cr-button branding overrides

---------

Co-authored-by: Claudio DeSouza <cdesouza@igalia.com>
Co-authored-by: cdesouza-chromium <cdesouza@brave.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants