Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ericandrewlewis committed Aug 9, 2019
1 parent d569ea7 commit 8b49a8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/service/performance-impl.js
Expand Up @@ -230,7 +230,10 @@ export class Performance {
this.viewer_.onVisibilityChanged(this.onViewerVisibilityChange_);
}

if (this.supportsLayoutInstabilityAPIv76_ || this.supportsLayoutInstabilityAPIv77_) {
if (
this.supportsLayoutInstabilityAPIv76_ ||
this.supportsLayoutInstabilityAPIv77_
) {
// Register a handler to record the layout shift metric when the page
// enters the hidden lifecycle state.
this.win.addEventListener(
Expand Down Expand Up @@ -416,7 +419,10 @@ export class Performance {
if (this.win.PerformanceLayoutJank) {
this.tickLayoutJankScore_();
}
if (this.supportsLayoutInstabilityAPIv76_ || this.supportsLayoutInstabilityAPIv77_) {
if (
this.supportsLayoutInstabilityAPIv76_ ||
this.supportsLayoutInstabilityAPIv77_
) {
this.tickLayoutShiftScore_();
}
}
Expand All @@ -431,7 +437,10 @@ export class Performance {
if (this.win.PerformanceLayoutJank) {
this.tickLayoutJankScore_();
}
if (this.supportsLayoutInstabilityAPIv76_ || this.supportsLayoutInstabilityAPIv77_) {
if (
this.supportsLayoutInstabilityAPIv76_ ||
this.supportsLayoutInstabilityAPIv77_
) {
this.tickLayoutShiftScore_();
}
}
Expand Down
1 change: 0 additions & 1 deletion test/unit/test-performance.js
Expand Up @@ -1478,7 +1478,6 @@ describes.realWin('PeformanceObserver metrics', {amp: true}, env => {
sandbox.stub(Services.platformFor(fakeWin), 'isChrome').returns(true);
sandbox.stub(Services.platformFor(fakeWin), 'isSafari').returns(false);


// Fake the Performance API.
fakeWin.PerformanceObserver.supportedEntryTypes = ['layout-shift'];

Expand Down

0 comments on commit 8b49a8d

Please sign in to comment.