Commit 4a66b72a authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Enable CorbAllowlistAlsoAppliesToOorCors via fieldtrial...config.json.

The CL tweaks 1 remaining test that relied on the legacy/deprecated
behavior that allowed CORS-exempt cross-origin requests from content
scripts.  The CL changes the test request to same-origin.  This change
should be okay - the cross-origin aspect of the request was not
essential to the test, which mostly wanted to verify that the XHR
results in the "blinkRequestResource XMLHttpRequest"
|domExpectedActivity|.

Bug: 920638
Change-Id: I9d9f765b91c7524586ac1b3280ba063274dba0e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359392Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799677}
parent fe66aae8
...@@ -324,9 +324,9 @@ function executeDOMChangesOnTabUpdated() { ...@@ -324,9 +324,9 @@ function executeDOMChangesOnTabUpdated() {
'var testContext = testCanvas.getContext("2d");'; 'var testContext = testCanvas.getContext("2d");';
// Does an XHR from inside a content script. // Does an XHR from inside a content script.
var cnnUrl = getURLWithPort('http://www.cnn.com'); var xhrUrl = getURLWithPort(defaultUrl);
code += 'var request = new XMLHttpRequest(); ' + code += 'var request = new XMLHttpRequest(); ' +
'request.open("POST", "' + cnnUrl + '", false); ' + 'request.open("POST", "' + xhrUrl + '", false); ' +
'request.setRequestHeader("Content-type", ' + 'request.setRequestHeader("Content-type", ' +
' "text/plain;charset=UTF-8"); ' + ' "text/plain;charset=UTF-8"); ' +
'request.send(); ' + 'request.send(); ' +
......
...@@ -1495,6 +1495,24 @@ ...@@ -1495,6 +1495,24 @@
] ]
} }
], ],
"CorbAllowlistAlsoAppliesToOorCors": [
{
"platforms": [
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"CorbAllowlistAlsoAppliesToOorCors"
]
}
]
}
],
"CrOSMinFilelistKB": [ "CrOSMinFilelistKB": [
{ {
"platforms": [ "platforms": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment