diff --git a/3p/integration.js b/3p/integration.js index 175baf3b42d6..2cd949dfd448 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -148,7 +148,7 @@ import {gumgum} from '../ads/vendors/gumgum'; import {holder} from '../ads/vendors/holder'; import {ibillboard} from '../ads/vendors/ibillboard'; import {idealmedia} from '../ads/vendors/idealmedia'; -import {imaVideo} from '../ads/google/imaVideo'; +import {imaVideo} from '../ads/google/ima/ima-video'; import {imedia} from '../ads/vendors/imedia'; import {imobile} from '../ads/vendors/imobile'; import {imonomy} from '../ads/vendors/imonomy'; diff --git a/3p/vendors/ima-video.js b/3p/vendors/ima-video.js index 3ebaf2d3c21b..035493f8025b 100644 --- a/3p/vendors/ima-video.js +++ b/3p/vendors/ima-video.js @@ -20,7 +20,7 @@ import '../polyfills'; import {draw3p, init} from '../integration-lib'; import {register} from '../3p'; -import {imaVideo} from '../../ads/google/imaVideo'; +import {imaVideo} from '../../ads/google/ima/ima-video'; init(window); register('ima-video', imaVideo); diff --git a/ads/google/ima/OWNERS b/ads/google/ima/OWNERS new file mode 100644 index 000000000000..cae983b4cc00 --- /dev/null +++ b/ads/google/ima/OWNERS @@ -0,0 +1,14 @@ +// For an explanation of the OWNERS rules and syntax, see: +// https://github.com/ampproject/amp-github-apps/blob/main/owners/OWNERS.example + +{ + rules: [ + { + owners: [ + {name: 'ampproject/wg-bento'}, + {name: 'ampproject/wg-components'}, + {name: 'ampproject/wg-monetization'}, + ], + }, + ], +} diff --git a/ads/google/ima-player-data.js b/ads/google/ima/ima-player-data.js similarity index 100% rename from ads/google/ima-player-data.js rename to ads/google/ima/ima-player-data.js diff --git a/ads/google/imaVideo.js b/ads/google/ima/ima-video.js similarity index 99% rename from ads/google/imaVideo.js rename to ads/google/ima/ima-video.js index c1f1e230ba20..28f1c246108e 100644 --- a/ads/google/imaVideo.js +++ b/ads/google/ima/ima-video.js @@ -14,14 +14,19 @@ * limitations under the License. */ -import {CONSENT_POLICY_STATE} from '../../src/core/constants/consent-state'; +import {CONSENT_POLICY_STATE} from '../../../src/core/constants/consent-state'; import {ImaPlayerData} from './ima-player-data'; -import {camelCaseToTitleCase, px, setStyle, setStyles} from '../../src/style'; -import {getData} from '../../src/event-helper'; -import {isObject} from '../../src/core/types'; -import {loadScript} from '../../3p/3p'; -import {throttle} from '../../src/core/types/function'; -import {tryParseJson} from '../../src/json'; +import { + camelCaseToTitleCase, + px, + setStyle, + setStyles, +} from '../../../src/style'; +import {getData} from '../../../src/event-helper'; +import {isObject} from '../../../src/core/types'; +import {loadScript} from '../../../3p/3p'; +import {throttle} from '../../../src/core/types/function'; +import {tryParseJson} from '../../../src/json'; /** * Possible player states. diff --git a/build-system/test-configs/conformance-config.textproto b/build-system/test-configs/conformance-config.textproto index 3e4519f02eb5..51f965004db7 100644 --- a/build-system/test-configs/conformance-config.textproto +++ b/build-system/test-configs/conformance-config.textproto @@ -388,7 +388,7 @@ requirement: { allowlist: 'ads/vendors/imedia.js' allowlist: 'ads/vendors/kargo.js' allowlist: 'ads/vendors/mads.js' - allowlist: 'ads/google/imaVideo.js' + allowlist: 'ads/google/ima/ima-video.js' allowlist: 'ads/vendors/zen.js' allowlist: 'extensions/amp-viewer-integration/0.1/messaging/messaging.js' # published as standalone library allowlist: 'src/json.js' # Where parseJson itself is implemented. @@ -406,7 +406,7 @@ requirement: { # 3p ads are OK allowlist: 'ads/vendors/adfox.js' - allowlist: 'ads/vendors/google/imaVideo.js' + allowlist: 'ads/vendors/google/ima/ima-video.js' allowlist: 'ads/vendors/netletix.js' allowlist: 'ads/vendors/yandex.js' allowlist: 'extensions/amp-access/0.1/amp-access-iframe.js' # False-positive @@ -439,7 +439,7 @@ requirement: { # We would have to fix this to property obfuscated the 3p frame code. allowlist: '3p/iframe-messaging-client.js' allowlist: 'ads/google/deprecated_doubleclick.js' - allowlist: 'ads/google/imaVideo.js' + allowlist: 'ads/google/ima/ima-video.js' } requirement: { diff --git a/build-system/test-configs/dep-check-config.js b/build-system/test-configs/dep-check-config.js index 6c789afe0d5c..2fabcc703647 100644 --- a/build-system/test-configs/dep-check-config.js +++ b/build-system/test-configs/dep-check-config.js @@ -145,7 +145,7 @@ exports.rules = [ // Some ads need to depend on json.js 'ads/**->src/json.js', // IMA, similar to other non-Ad 3Ps above, needs access to event-helper - 'ads/google/imaVideo.js->src/event-helper.js', + 'ads/google/ima/ima-video.js->src/event-helper.js', ], }, { diff --git a/build-system/test-configs/forbidden-terms.js b/build-system/test-configs/forbidden-terms.js index b9ed9225dee8..d7e498e34e00 100644 --- a/build-system/test-configs/forbidden-terms.js +++ b/build-system/test-configs/forbidden-terms.js @@ -576,7 +576,7 @@ const forbiddenTermsGlobal = { 'src/core/assert/base.js', // Has actual implementation of assertElement. 'src/core/assert/dev.js', // Has actual implementation of assertElement. 'src/polyfills/custom-elements.js', - 'ads/google/imaVideo.js', // Required until #22277 is fixed. + 'ads/google/ima/ima-video.js', // Required until #22277 is fixed. '3p/twitter.js', // Runs in a 3p window context, so cannot import log.js. ], }, diff --git a/extensions/amp-ima-video/0.1/amp-ima-video.js b/extensions/amp-ima-video/0.1/amp-ima-video.js index e351f37119bd..c55f8c9d764b 100644 --- a/extensions/amp-ima-video/0.1/amp-ima-video.js +++ b/extensions/amp-ima-video/0.1/amp-ima-video.js @@ -15,7 +15,7 @@ */ import {Deferred} from '../../../src/core/data-structures/promise'; -import {ImaPlayerData} from '../../../ads/google/ima-player-data'; +import {ImaPlayerData} from '../../../ads/google/ima/ima-player-data'; import {PauseHelper} from '../../../src/utils/pause-helper'; import {Services} from '../../../src/services'; import {VideoEvents} from '../../../src/video-interface'; diff --git a/extensions/amp-ima-video/0.1/test/test-amp-ima-video.js b/extensions/amp-ima-video/0.1/test/test-amp-ima-video.js index 7260c538de89..d5f8159e11ca 100644 --- a/extensions/amp-ima-video/0.1/test/test-amp-ima-video.js +++ b/extensions/amp-ima-video/0.1/test/test-amp-ima-video.js @@ -15,7 +15,7 @@ */ import '../amp-ima-video'; -import * as imaVideoObj from '../../../../ads/google/imaVideo'; +import * as imaVideoObj from '../../../../ads/google/ima/ima-video'; import {CONSENT_POLICY_STATE} from '../../../../src/core/constants/consent-state'; import {Services} from '../../../../src/services';