From 0426e3c068668eb7952d6c33a7c8c5ac9e3eea01 Mon Sep 17 00:00:00 2001 From: JoelEinbinder Date: Thu, 12 Oct 2017 01:17:06 -0700 Subject: [PATCH] Roll chromium to 508268 (#1019) This gets us: - Plural metrics names https://crrev.com/507885 - TargetInfoChanged on URL changes https://crrev.com/508049 - Sending proper resource types for requests https://crrev.com/667504 Fixes #734 --- docs/api.md | 12 ++++++------ lib/Page.js | 8 ++++---- package.json | 2 +- test/test.js | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/api.md b/docs/api.md index 793850975ad..c0a321fa8d1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -671,10 +671,10 @@ If there's no element matching `selector`, the method throws an error. #### page.getMetrics() - returns: <[Object]> Object containing metrics as key/value pairs. - `Timestamp` <[number]> The timestamp when the metrics sample was taken. - - `DocumentCount` <[number]> Number of documents in the page. - - `FrameCount` <[number]> Number of frames in the page. - - `JSEventListenerCount` <[number]> Number of events in the page. - - `NodeCount` <[number]> Number of DOM nodes in the page. + - `Documents` <[number]> Number of documents in the page. + - `Frames` <[number]> Number of frames in the page. + - `JSEventListeners` <[number]> Number of events in the page. + - `Nodes` <[number]> Number of DOM nodes in the page. - `LayoutCount` <[number]> Total number of full or partial page layout. - `RecalcStyleCount` <[number]> Total number of page style recalculations. - `LayoutDuration` <[number]> Combined durations of all page layouts. @@ -820,7 +820,7 @@ The `format` options are: The method iterates javascript heap and finds all the objects with the given prototype. ```js -// Create a Map object +// Create a Map object await page.evaluate(() => window.map = new Map()); // Get a handle to the Map object prototype const mapPrototype = await page.evaluateHandle(() => Map.prototype); @@ -1543,7 +1543,7 @@ await resultHandle.dispose(); The method iterates javascript heap and finds all the objects with the given prototype. ```js -// Create a Map object +// Create a Map object await page.evaluate(() => window.map = new Map()); // Get a handle to the Map object prototype const mapPrototype = await page.evaluateHandle(() => Map.prototype); diff --git a/lib/Page.js b/lib/Page.js index ff72d2adfb8..ee933e1498c 100644 --- a/lib/Page.js +++ b/lib/Page.js @@ -832,10 +832,10 @@ class Page extends EventEmitter { /** @type {!Set} */ const supportedMetrics = new Set([ 'Timestamp', - 'DocumentCount', - 'FrameCount', - 'JSEventListenerCount', - 'NodeCount', + 'Documents', + 'Frames', + 'JSEventListeners', + 'Nodes', 'LayoutCount', 'RecalcStyleCount', 'LayoutDuration', diff --git a/package.json b/package.json index 08e44b10076..7e1d8aa8d6b 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "ws": "^3.0.0" }, "puppeteer": { - "chromium_revision": "507565" + "chromium_revision": "508268" }, "devDependencies": { "@types/debug": "0.0.30", diff --git a/test/test.js b/test/test.js index e556fdf72e1..e45598d4896 100644 --- a/test/test.js +++ b/test/test.js @@ -796,10 +796,10 @@ describe('Page', function() { function checkMetrics(metrics) { const metricsToCheck = new Set([ 'Timestamp', - 'DocumentCount', - 'FrameCount', - 'JSEventListenerCount', - 'NodeCount', + 'Documents', + 'Frames', + 'JSEventListeners', + 'Nodes', 'LayoutCount', 'RecalcStyleCount', 'LayoutDuration',