From 38831b7ff29863d9b93ab58f3dfba68545df6745 Mon Sep 17 00:00:00 2001 From: Cole Ellison Date: Mon, 25 Jun 2018 16:18:33 -0400 Subject: [PATCH] core(driver): [minor] fix spelling of evaluate (#5553) --- lighthouse-core/gather/driver.js | 6 +++--- .../gatherers/dobetterweb/tags-blocking-first-paint.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lighthouse-core/gather/driver.js b/lighthouse-core/gather/driver.js index c9d3b98d8918..ad218c159ab1 100644 --- a/lighthouse-core/gather/driver.js +++ b/lighthouse-core/gather/driver.js @@ -173,7 +173,7 @@ class Driver { * @param {string} scriptSource * @return {Promise} Identifier of the added script. */ - evaluteScriptOnNewDocument(scriptSource) { + evaluateScriptOnNewDocument(scriptSource) { return this.sendCommand('Page.addScriptToEvaluateOnLoad', { scriptSource, }); @@ -1064,7 +1064,7 @@ class Driver { * @return {Promise} */ async cacheNatives() { - await this.evaluteScriptOnNewDocument(`window.__nativePromise = Promise; + await this.evaluateScriptOnNewDocument(`window.__nativePromise = Promise; window.__nativeError = Error;`); } @@ -1074,7 +1074,7 @@ class Driver { */ async registerPerformanceObserver() { const scriptStr = `(${pageFunctions.registerPerformanceObserverInPage.toString()})()`; - await this.evaluteScriptOnNewDocument(scriptStr); + await this.evaluateScriptOnNewDocument(scriptStr); } /** diff --git a/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js b/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js index bb3cb255ca47..80e5149cafad 100644 --- a/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +++ b/lighthouse-core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js @@ -174,7 +174,7 @@ class TagsBlockingFirstPaint extends Gatherer { * @param {LH.Gatherer.PassContext} passContext */ beforePass(passContext) { - return passContext.driver.evaluteScriptOnNewDocument(`(${installMediaListener.toString()})()`); + return passContext.driver.evaluateScriptOnNewDocument(`(${installMediaListener.toString()})()`); } /**