Skip to content

Commit

Permalink
🧪Fully launch json targeting expansion experiment (#29831)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcordry committed Sep 14, 2020
1 parent a670e5c commit cf3ded8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
Expand Up @@ -702,19 +702,11 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
return this.mergeRtcResponses_(results);
});

// TODO(#28555): Delete extra logic when 'expand-json-targeting' exp launches.
const isJsonTargetingExpOn = isExperimentOn(
this.win,
'expand-json-targeting'
);

const targetingExpansionPromise = isJsonTargetingExpOn
? timerService
.timeoutPromise(1000, this.expandJsonTargeting_(rtcParamsPromise))
.catch(() => {
dev().warn(TAG, 'JSON Targeting expansion failed/timed out.');
})
: Promise.resolve();
const targetingExpansionPromise = timerService
.timeoutPromise(1000, this.expandJsonTargeting_(rtcParamsPromise))
.catch(() => {
dev().warn(TAG, 'JSON Targeting expansion failed/timed out.');
});

Promise.all([
rtcParamsPromise,
Expand Down
Expand Up @@ -807,7 +807,6 @@ describes.realWin('amp-ad-network-doubleclick-impl', realWinConfig, (env) => {
});

it('expands CLIENT_ID in targeting', () => {
toggleExperiment(win, 'expand-json-targeting', true, true);
element.setAttribute(
'json',
`{
Expand All @@ -823,7 +822,6 @@ describes.realWin('amp-ad-network-doubleclick-impl', realWinConfig, (env) => {
});

it('expands CLIENT_ID in targeting inside array', () => {
toggleExperiment(win, 'expand-json-targeting', true, true);
element.setAttribute(
'json',
`{
Expand Down

0 comments on commit cf3ded8

Please sign in to comment.