Skip to content

Commit fc205bb

Browse files
authored
🚮 amp-list: remove experiment 'protocol-adapters' (ampproject#29688)
* amp-list: remove experiment 'protocol-adapters' * some more cropped up
1 parent 7b45d68 commit fc205bb

File tree

6 files changed

+0
-26
lines changed

6 files changed

+0
-26
lines changed

‎build-system/global-configs/canary-config.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"flexAdSlots": 0.05,
2929
"intersect-resources": 1,
3030
"ios-fixed-no-transfer": 1,
31-
"protocol-adapters": 1,
3231
"pump-early-frame": 1,
3332
"remove-task-timeout": 0,
3433
"swg-gpay-api": 1,

‎build-system/global-configs/prod-config.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"flexAdSlots": 0.05,
3030
"intersect-resources": 1,
3131
"ios-fixed-no-transfer": 0,
32-
"protocol-adapters": 1,
3332
"pump-early-frame": 1,
3433
"swg-gpay-api": 1,
3534
"swg-gpay-native": 1,

‎extensions/amp-list/0.1/amp-list.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,6 @@ export class AmpList extends AMP.BaseElement {
483483
getAmpScriptJson_(src) {
484484
return Promise.resolve()
485485
.then(() => {
486-
userAssert(
487-
isExperimentOn(this.win, 'protocol-adapters'),
488-
`Experiment 'protocol-adapters' is not turned on.`
489-
);
490486
userAssert(
491487
!this.ssrTemplateHelper_.isEnabled(),
492488
'[amp-list]: "amp-script" URIs cannot be used in SSR mode.'

‎extensions/amp-list/0.1/test-e2e/test-function-src.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describes.endtoend(
1919
{
2020
testUrl:
2121
'http://localhost:8000/test/fixtures/e2e/amp-list/amp-list-function-src.html',
22-
experiments: ['protocol-adapters'],
2322
environments: ['single'],
2423
},
2524
async (env) => {
@@ -45,7 +44,6 @@ describes.endtoend(
4544
{
4645
testUrl:
4746
'http://localhost:8000/test/fixtures/e2e/amp-list/amp-list-function-load-more.html',
48-
experiments: ['protocol-adapters'],
4947
environments: ['single'],
5048
},
5149
async (env) => {

‎extensions/amp-list/0.1/test/test-amp-list.js‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -941,15 +941,13 @@ describes.repeated(
941941
});
942942

943943
it('"amp-script:" uri should skip rendering and emit an error', () => {
944-
toggleExperiment(win, 'protocol-adapters', true);
945944
list.element.setAttribute('src', 'amp-script:fetchData');
946945

947946
listMock.expects('scheduleRender_').never();
948947

949948
const errorMsg = /cannot be used in SSR mode/;
950949
expectAsyncConsoleError(errorMsg);
951950
expect(list.layoutCallback()).eventually.rejectedWith(errorMsg);
952-
toggleExperiment(win, 'protocol-adapters', false);
953951
});
954952

955953
it('Bound [src] should skip rendering and emit an error', async () => {
@@ -1013,14 +1011,7 @@ describes.repeated(
10131011
list = createAmpList(element);
10141012
});
10151013

1016-
it('should throw an error if used without the experiment enabled', async () => {
1017-
const errorMsg = /Invalid value: amp-script:example.fetchData/;
1018-
expectAsyncConsoleError(errorMsg);
1019-
expect(list.layoutCallback()).to.eventually.throw(errorMsg);
1020-
});
1021-
10221014
it('should throw an error if given an invalid format', async () => {
1023-
toggleExperiment(win, 'protocol-adapters', true);
10241015
const errorMsg = /URIs must be of the format/;
10251016

10261017
element.setAttribute('src', 'amp-script:fetchData');
@@ -1037,7 +1028,6 @@ describes.repeated(
10371028
});
10381029

10391030
it('should throw if specified amp-script does not exist', () => {
1040-
toggleExperiment(win, 'protocol-adapters', true);
10411031
element.setAttribute('src', 'amp-script:doesnotexist.fn');
10421032

10431033
const errorMsg = /could not find <amp-script> with/;
@@ -1046,7 +1036,6 @@ describes.repeated(
10461036
});
10471037

10481038
it('should fail if function call rejects', async () => {
1049-
toggleExperiment(win, 'protocol-adapters', true);
10501039
ampScriptEl.getImpl = () =>
10511040
Promise.resolve({
10521041
callFunction: () =>
@@ -1062,7 +1051,6 @@ describes.repeated(
10621051
it('should render non-array if single-item is set', async () => {
10631052
const callFunctionResult = {'items': {title: 'Title'}};
10641053
element.setAttribute('single-item', 'true');
1065-
toggleExperiment(win, 'protocol-adapters', true);
10661054
ampScriptEl.getImpl = () =>
10671055
Promise.resolve({
10681056
callFunction(fnId) {
@@ -1087,7 +1075,6 @@ describes.repeated(
10871075
});
10881076

10891077
it('should render a list from AmpScriptService provided data', async () => {
1090-
toggleExperiment(win, 'protocol-adapters', true);
10911078
ampScriptEl.getImpl = () =>
10921079
Promise.resolve({
10931080
callFunction(fnId) {

‎tools/experiments/experiments-config.js‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ export const EXPERIMENTS = [
230230
spec: 'https://github.com/ampproject/amphtml/issues/24110',
231231
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/24113',
232232
},
233-
{
234-
id: 'protocol-adapters',
235-
name: 'Allow amp-list to get its data from amp-script functions.',
236-
spec: 'https://github.com/ampproject/amphtml/issues/26474',
237-
},
238233
{
239234
id: 'adsense-ad-size-optimization',
240235
name:

0 commit comments

Comments
 (0)