diff --git a/lib/Coverage.js b/lib/Coverage.js index b6f30bc214c..fe38a83238c 100644 --- a/lib/Coverage.js +++ b/lib/Coverage.js @@ -224,8 +224,8 @@ class CSSCoverage { async stop() { assert(this._enabled, 'CSSCoverage is not enabled'); this._enabled = false; - const [ruleTrackingResponse] = await Promise.all([ - this._client.send('CSS.stopRuleUsageTracking'), + const ruleTrackingResponse = await this._client.send('CSS.stopRuleUsageTracking'); + await Promise.all([ this._client.send('CSS.disable'), this._client.send('DOM.disable'), ]); diff --git a/test/coverage.spec.js b/test/coverage.spec.js index 67fac609956..e62a3ae6d5a 100644 --- a/test/coverage.spec.js +++ b/test/coverage.spec.js @@ -189,7 +189,7 @@ module.exports.addTests = function({testRunner, expect}) { expect(coverage.length).toBe(0); }); }); - xit('should work with a recently loaded stylesheet', async function({page, server}) { + it('should work with a recently loaded stylesheet', async function({page, server}) { await page.coverage.startCSSCoverage(); await page.evaluate(async url => { document.body.textContent = 'hello, world';