A plain text search should be performed when regex option is toggled off.

1. Search option should NOT perform a regex search when regex option is toggled off.
2. Regex searches are NOT being performed on queries that are already surrounded by forward slashes.

Problem with code:
Checks and edits during our const Query creation are too broad.

1. Queries were being surrounded by forward slashes even when they were already included in the query, eg below.
query = /example/ would then become //example//
2. In the try/catch where a new regex is created, regex.text('/example/') would create a regex for our query which is expected BUT should only occur when our Regex search option is enabled.

Fix:
Added additional checks during the creation of a new Regex.

1. First confirm this.isRegex is true && our query is NOT already surrounded by forward slashes before adding any.
2. Added an additional this.isRegex check on all new Regex creations.

R=szuend@chromium.org

Fixed: 349428386
Change-Id: If4a985c7cec3098f6a5358c9091db8b2cfe6890c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5683367
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
1 file changed
tree: e8b1d02701f67d127a3e5fc244ec8bfa446753c3
  1. .vscode/
  2. build_overrides/
  3. config/
  4. docs/
  5. extension-api/
  6. extensions/
  7. front_end/
  8. inspector_overlay/
  9. node_modules/
  10. scripts/
  11. test/
  12. third_party/
  13. v8/
  14. .clang-format
  15. .editorconfig
  16. .eslintignore
  17. .eslintrc.js
  18. .git-blame-ignore-revs
  19. .gitallowed
  20. .gitattributes
  21. .gitignore
  22. .gitmodules
  23. .gn
  24. .mailmap
  25. .npmignore
  26. .npmrc
  27. .style.yapf
  28. .stylelintignore
  29. .stylelintrc.json
  30. AUTHORS
  31. BUILD.gn
  32. codereview.settings
  33. DEPS
  34. LICENSE
  35. OWNERS
  36. package-lock.json
  37. package.json
  38. PRESUBMIT.py
  39. README.md
  40. tsconfig.json
  41. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

The client-side of the Chrome DevTools, including all TypeScript & CSS to run the DevTools webapp.

Source code and documentation

The frontend is available on chromium.googlesource.com. Check out the project documentation for instructions to set up, use, and maintain a DevTools front-end checkout, as well as design guidelines, and architectural documentation.

Additional references

Source mirrors

DevTools frontend repository is mirrored on GitHub.

DevTools frontend is also available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES modules, so consuming this package in other tools may require some effort.

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Getting in touch