| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
RequestApproximateGeolocation) {The test name is not very helpful - this test is somehow testing more that only requesting approximate geolocation permission.
As I understand this, we
1. request (and grant) approx location (prompt)
2. re-request approx location (no prompt)
3. request (and grant) precise location (prompt) -> "full" location permissions
4. re-request approx location (no prompt)
So, its more like "RequestFullGeolocation", maybe?
nit: Since its a long text, can you maybe document this as a docstring in the beginning of the test, so readers see in one go what this test is doing? Not sure this makes sense and comment-styles are highly subjective, so feel free to ignore, you already comment in this test which is fine.
approx_only_permission_result);
EXPECT_EQ(permission_controller->GetPermissionResultForCurrentDocument(
kPreciseGeolocationDescriptor, GetActiveMainFrame()),
content::PermissionResult(
blink::mojom::PermissionStatus::ASK,
content::PermissionStatusSource::UNSPECIFIED,
GeolocationSetting({.approximate = PermissionOption::kAllowed,
.precise = PermissionOption::kAsk})));
Pls remove, I think this is equivalent to the cmd before, maybe some refactoring leftover?
PromptOptions prompt_options = std::monostate();Again what learned! I did not know about this idiom.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
RequestApproximateGeolocation) {The test name is not very helpful - this test is somehow testing more that only requesting approximate geolocation permission.
As I understand this, we
1. request (and grant) approx location (prompt)
2. re-request approx location (no prompt)
3. request (and grant) precise location (prompt) -> "full" location permissions
4. re-request approx location (no prompt)So, its more like "RequestFullGeolocation", maybe?
nit: Since its a long text, can you maybe document this as a docstring in the beginning of the test, so readers see in one go what this test is doing? Not sure this makes sense and comment-styles are highly subjective, so feel free to ignore, you already comment in this test which is fine.
Changed the name of the test. As for the docstring, I just know it will go out-of-sync, so I think relying on the actual content of the test being readable is preferable.
approx_only_permission_result);
EXPECT_EQ(permission_controller->GetPermissionResultForCurrentDocument(
kPreciseGeolocationDescriptor, GetActiveMainFrame()),
content::PermissionResult(
blink::mojom::PermissionStatus::ASK,
content::PermissionStatusSource::UNSPECIFIED,
GeolocationSetting({.approximate = PermissionOption::kAllowed,
.precise = PermissionOption::kAsk})));
Pls remove, I think this is equivalent to the cmd before, maybe some refactoring leftover?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |