Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
browser(webkit): fix mac compilation after latest roll (#6727)
Yury Semikhatsky8770c6460125
diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBERindex 4d9cfa2903..049eb5eb39 100644--- a/browser_patches/webkit/BUILD_NUMBER+++ b/browser_patches/webkit/BUILD_NUMBER@@ -1,2 +1,2 @@-1483-Changed: [email protected] Mon 24 May 2021 12:26:08 PM PDT+1484+Changed: [email protected] Mon 24 May 2021 02:43:11 PM PDTdiff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diffindex 30a8c8a3de..70b308d056 100644--- a/browser_patches/webkit/patches/bootstrap.diff+++ b/browser_patches/webkit/patches/bootstrap.diff@@ -11965,10 +11965,10 @@ index 0000000000000000000000000000000000000000..4ec8b96bbbddf8a7b042f53a8068754a+cairo_status_t cairo_image_surface_write_to_jpeg_mem(cairo_surface_t *sfc, unsigned char **data, size_t *len, int quality);diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cppnew file mode 100644-index 0000000000000000000000000000000000000000..911f4f8f3eb0aa66fe6d11bb46a5f836febc5c60+index 0000000000000000000000000000000000000000..b30668cc6dfc1d090600980d9ff1da5ed52902aa--- /dev/null+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp-@@ -0,0 +1,272 @@+@@ -0,0 +1,271 @@+/*+ * Copyright (C) 2020 Microsoft Corporation.+ *@@ -12219,10 +12219,9 @@ index 0000000000000000000000000000000000000000..911f4f8f3eb0aa66fe6d11bb46a5f836+ }+ auto cfData = adoptCF(CFDataCreateMutable(kCFAllocatorDefault, 0));+ WebCore::encodeImage(imagePtr, CFSTR("public.jpeg"), m_screencastQuality * 0.1, cfData.get());-+ Vector<char> base64Data;-+ base64Encode(CFDataGetBytePtr(cfData.get()), CFDataGetLength(cfData.get()), base64Data);++ String base64Data = base64EncodeToString(CFDataGetBytePtr(cfData.get()), CFDataGetLength(cfData.get()));+ ++m_screencastFramesInFlight;-+ m_frontendDispatcher->screencastFrame(String(base64Data.data(), base64Data.size()), displaySize.width(), displaySize.height());++ m_frontendDispatcher->screencastFrame(base64Data, displaySize.width(), displaySize.height());+ }+ if (m_encoder)+ m_encoder->encodeFrame(WTFMove(imageRef));diff --git a/tests/chromium/js-coverage.spec.ts b/tests/chromium/js-coverage.spec.tsindex 5a9bebe0b6..a6f5cea61b 100644--- a/tests/chromium/js-coverage.spec.ts+++ b/tests/chromium/js-coverage.spec.ts@@ -16,10 +16,11 @@import { contextTest as it, expect } from '../config/browserTest';-it('should work', async function({page, server}) {+it.only('should work', async function({page, server}) {await page.coverage.startJSCoverage();- await page.goto(server.PREFIX + '/jscoverage/simple.html', { waitUntil: 'load' });+ await page.goto(server.PREFIX + '/jscoverag e/simple.html', { waitUntil: 'load' });const coverage = await page.coverage.stopJSCoverage();+ console.log(JSON.stringify(coverage, null, 2));expect(coverage.length).toBe(1);expect(coverage[0].url).toContain('/jscoverage/simple.html');expect(coverage[0].functions.find(f => f.functionName === 'foo').ranges[0].count).toEqual(1);