Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Move imaVideo.js so it can be owned by Bento and Components #34247

Merged
merged 7 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion 3p/vendors/ima-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 14 additions & 0 deletions ads/google/ima/OWNERS
Original file line number Diff line number Diff line change
@@ -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'},
],
},
],
}
File renamed without changes.
19 changes: 12 additions & 7 deletions ads/google/imaVideo.js → ads/google/ima/ima-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions build-system/test-configs/conformance-config.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion build-system/test-configs/dep-check-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion build-system/test-configs/forbidden-terms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
],
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-ima-video/0.1/amp-ima-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-ima-video/0.1/test/test-amp-ima-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down