diff --git a/extensions/amp-script/0.1/amp-script.js b/extensions/amp-script/0.1/amp-script.js index 0dc9b16e5442..1fdf68e7edf2 100644 --- a/extensions/amp-script/0.1/amp-script.js +++ b/extensions/amp-script/0.1/amp-script.js @@ -139,8 +139,8 @@ export class AmpScript extends AMP.BaseElement { /** * @override */ - onLayoutMeasure() { - super.onLayoutMeasure(); + onMeasureChanged() { + super.onMeasureChanged(); if (this.layoutCompleted_) { return; } diff --git a/extensions/amp-script/0.1/test/unit/test-amp-script.js b/extensions/amp-script/0.1/test/unit/test-amp-script.js index 54285b161ac5..873cfbbf87b8 100644 --- a/extensions/amp-script/0.1/test/unit/test-amp-script.js +++ b/extensions/amp-script/0.1/test/unit/test-amp-script.js @@ -98,14 +98,14 @@ describes.fakeWin('AmpScript', {amp: {runtimeOn: false}}, env => { it('should not warn when there is positive width/height', () => { const warnStub = env.sandbox.stub(user(), 'warn'); env.sandbox.stub(script, 'getLayoutBox').returns({height: 1, width: 1}); - script.onLayoutMeasure(); + script.onMeasureChanged(); expect(warnStub).to.have.callCount(0); }); it('should warn if there is zero width/height', () => { const warnStub = env.sandbox.stub(user(), 'warn'); env.sandbox.stub(script, 'getLayoutBox').returns({height: 0, width: 0}); - script.onLayoutMeasure(); + script.onMeasureChanged(); expect(warnStub).calledWith( 'amp-script', @@ -120,7 +120,7 @@ describes.fakeWin('AmpScript', {amp: {runtimeOn: false}}, env => { allowConsoleError(() => { script.layoutCallback(); }); - script.onLayoutMeasure(); + script.onMeasureChanged(); expect(warnStub).to.have.callCount(0); }); });