From fd88eb5358504f9b32615b1c3501d1401ed244f5 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 13 Oct 2017 13:52:28 -0700 Subject: [PATCH] feat(chromium): roll chromium to r508693 (#1031) This roll enables network throttling in headless: http://crrev.com/508571 --- package.json | 2 +- .../screenshot-element-padding-border.png | Bin 272 -> 168 bytes test/test.js | 14 ++++++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 04450af38d6..2cca7587a23 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "ws": "^3.0.0" }, "puppeteer": { - "chromium_revision": "508367" + "chromium_revision": "508693" }, "devDependencies": { "@types/debug": "0.0.30", diff --git a/test/golden/screenshot-element-padding-border.png b/test/golden/screenshot-element-padding-border.png index 13f8880e95ee9b03bac8a172a88262614d1a0f56..917dd48188d45ea1b07c1fa460a691a9e4a2d050 100644 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL1|)l2v+e?^d`}n0kc`H+w+y)&3bP0l+XkKPxw46 literal 272 zcmeAS@N?(olHy`uVBq!ia0y~yV0;2(YjUsw$tUZh)PdA>PZ!6KiaBp@7;+sk5MVht zb!YqU=S2xS^j91Vop|WvtgEwbRx>m#UU!+9p<(9z|E24jjTs&+e)oOxtyUfe#->4p mv(w&RR%UqcI_3m}zz2q0J2ro*^H)JWW$<+Mb6Mw<&;$S!Hb!Cq diff --git a/test/test.js b/test/test.js index c6291426562..5b15f285023 100644 --- a/test/test.js +++ b/test/test.js @@ -1531,8 +1531,18 @@ describe('Page', function() { })); it('should take into account padding and border', SX(async function() { await page.setViewport({width: 500, height: 500}); - await page.setContent('something above

 

'); - const elementHandle = await page.$('h1'); + await page.setContent(` + something above + +
+ `); + const elementHandle = await page.$('div'); const screenshot = await elementHandle.screenshot(); expect(screenshot).toBeGolden('screenshot-element-padding-border.png'); }));