Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Extensions] Clean up and modernize ManifestTest and derivatives.
This CL cleans up quite a bit in this base class and derived tests: 1. The ManifestData class was using base::Value and asserting that a dictionary type was provided. It now uses base::Value::Dict and is type safe by design. 2. Along with using base::Value, it was using an instance with no type to signal error conditions. The new code returns absl::optional<base::Value::Dict> if an error occurs. 3. In many cases, ManifestData was constructed supplying both a dictionary for the manifest and name. In the cases where the dictionary specifies the name, there is no need to supply the name. Instead, the code now uses the constructor that looks up the name in the dictionary. This also fixes cases where the name in the dictionary and the name parameter were different. 4. Some places where base::Value was used have been converted to the more specific types of base::Value::Dict and base::Value::List. 5. Places where std::unique_ptr was used have been replaced with stack-based values. Bug: 1187061 Change-Id: I29452e8b46d3240344a55283c0fe90c2e074d606 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4113017 Reviewed-by: Solomon Kinard <solomonkinard@chromium.org> Commit-Queue: David Bertoni <dbertoni@chromium.org> Cr-Commit-Position: refs/heads/main@{#1085090}
- Loading branch information
David Bertoni
authored and
Chromium LUCI CQ
committed
Dec 19, 2022
1 parent
788ae28
commit ff310cb
Showing
22 changed files
with
224 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.