-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make AttributionReporting EnabledForAll by default
This CL also adds logic for sending a warning issue to devtools if the API was used in a context where it might break in the future when this change is reverted. See WICG/attribution-reporting-api#551 Bug: 1360563 Change-Id: I9a04b3ce9dbab5ab432c963419cb173e232aa881 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3877268 Reviewed-by: Ian Clelland <iclelland@chromium.org> Reviewed-by: John Delaney <johnidel@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org> Cr-Commit-Position: refs/heads/main@{#1045172} NOKEYCHECK=True GitOrigin-RevId: e959519cfe885d8387f53a50ba8271465dc06347
- Loading branch information
1 parent
5c4a024
commit 17758de
Showing
8 changed files
with
69 additions
and
0 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
11 changes: 11 additions & 0 deletions
11
...http/tests/inspector-protocol/attribution-reporting/non-delegated-permission-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Test that an iframe without the attribution-reporting permission gets a devtools warning | ||
Issue reported: { | ||
code : AttributionReportingIssue | ||
details : { | ||
attributionReportingIssueDetails : { | ||
violatingNodeId : <number> | ||
violationType : PermissionPolicyNotDelegated | ||
} | ||
} | ||
} | ||
|
19 changes: 19 additions & 0 deletions
19
...web_tests/http/tests/inspector-protocol/attribution-reporting/non-delegated-permission.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
(async function(testRunner) { | ||
const {dp} = await testRunner.startURL( | ||
'https://devtools.test:8443/inspector-protocol/empty.html', | ||
'Test that an iframe without the attribution-reporting permission gets a devtools warning'); | ||
|
||
await dp.Audits.enable(); | ||
const issue = dp.Audits.onceIssueAdded(); | ||
|
||
await dp.Runtime.evaluate({expression: ` | ||
document.body.innerHTML = '<iframe src="https://a.devtools.test:8443/inspector-protocol/attribution-reporting/resources/iframe-register-source.html">'; | ||
`}); | ||
|
||
testRunner.log((await issue).params.issue, 'Issue reported: ', ['violatingNodeId']); | ||
testRunner.completeTest(); | ||
}) |
6 changes: 6 additions & 0 deletions
6
...http/tests/inspector-protocol/attribution-reporting/resources/iframe-register-source.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<body> | ||
<img attributionsrc src="/inspector-protocol/resources/image.png"> | ||
</body> | ||
|