Skip to content

Commit

Permalink
fix rename error
Browse files Browse the repository at this point in the history
  • Loading branch information
William Chou committed Jul 14, 2017
1 parent 8201942 commit 61fe50f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion extensions/amp-access/0.1/amp-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export class AccessService {

// TODO(dvoytenko, #3742): This will refer to the ampdoc once AccessService
// is migrated to ampdoc as well.
Services.accessServiceForDoc(this.ampdoc).installActionHandler(
Services.actionServiceForDoc(this.ampdoc).installActionHandler(
this.accessElement_, this.handleAction_.bind(this));

// Calculate login URLs right away.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-carousel/0.1/slidescroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class AmpSlideScroll extends BaseSlides {
/** @override */
buildSlides() {
this.vsync_ = this.getVsync();
this.action_ = Services.accessServiceForDoc(this.element);
this.action_ = Services.actionServiceForDoc(this.element);

this.hasNativeSnapPoints_ = (
getStyle(this.element, 'scrollSnapType') != undefined);
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-form/0.1/amp-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class AmpForm {
this.xhr_ = Services.xhrFor(this.win_);

/** @const @private {!../../../src/service/action-impl.ActionService} */
this.actions_ = Services.accessServiceForDoc(this.form_);
this.actions_ = Services.actionServiceForDoc(this.form_);

/** @const @private {!../../../src/service/resources-impl.Resources} */
this.resources_ = Services.resourcesForDoc(this.form_);
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-form/0.1/test/test-amp-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ describes.repeated('', {
it('should install action handler and handle submit action', () => {
const form = getForm();
document.body.appendChild(form);
const actions = Services.accessServiceForDoc(form.ownerDocument);
const actions = Services.actionServiceForDoc(form.ownerDocument);

sandbox.stub(actions, 'installActionHandler');
const ampForm = new AmpForm(form);
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-selector/0.1/amp-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class AmpSelector extends AMP.BaseElement {

/** @override */
buildCallback() {
this.action_ = Services.accessServiceForDoc(this.element);
this.action_ = Services.actionServiceForDoc(this.element);
this.isMultiple_ = this.element.hasAttribute('multiple');
this.isDisabled_ = this.element.hasAttribute('disabled');

Expand Down
2 changes: 1 addition & 1 deletion src/document-submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function onDocumentFormSubmit_(e) {
// to deliver the submission event.
e.stopImmediatePropagation();

const actions = Services.accessServiceForDoc(form);
const actions = Services.actionServiceForDoc(form);
// TODO(choumx, #9699): HIGH.
actions.execute(form, 'submit', /*args*/ null, form, e, ActionTrust.MEDIUM);
}
Expand Down
4 changes: 2 additions & 2 deletions src/service/standard-actions-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class StandardActions {
this.ampdoc = ampdoc;

/** @const @private {!./action-impl.ActionService} */
this.actions_ = Services.accessServiceForDoc(ampdoc);
this.actions_ = Services.actionServiceForDoc(ampdoc);

/** @const @private {!./resources-impl.Resources} */
this.resources_ = Services.resourcesForDoc(ampdoc);
Expand All @@ -63,7 +63,7 @@ export class StandardActions {

/** @override */
adoptEmbedWindow(embedWin) {
this.installActions_(Services.accessServiceForDoc(embedWin.document));
this.installActions_(Services.actionServiceForDoc(embedWin.document));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/functional/test-document-submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('test-document-submit onDocumentFormSubmit_', () => {

it('should delegate xhr submit through action service', () => {
evt.target.setAttribute('action-xhr', 'https://example.com');
const actionService = Services.accessServiceForDoc(tgt);
const actionService = Services.actionServiceForDoc(tgt);
sandbox.stub(actionService, 'execute');
onDocumentFormSubmit_(evt);
expect(actionService.execute).to.have.been.calledOnce;
Expand All @@ -174,7 +174,7 @@ describe('test-document-submit onDocumentFormSubmit_', () => {
});

it('should not delegate non-XHR submit through action service', () => {
const actionService = Services.accessServiceForDoc(tgt);
const actionService = Services.actionServiceForDoc(tgt);
sandbox.stub(actionService, 'execute');
onDocumentFormSubmit_(evt);
expect(actionService.execute).to.have.not.been.called;
Expand Down

0 comments on commit 61fe50f

Please sign in to comment.