mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(chromium): roll Chromium to r662092 (#4462)
This roll includes: - [inspector_protocol:8ec18cf](8ec18cf088
) Support STRING16 in the template when converting CBOR map keys to protocol::Value. - [inspector_protocol:37518ac](37518ac421
) fix parsing of the last ASCII character This fixes protocol handling of UTF8 in both V8 and Chromium. Fixes #4443.
This commit is contained in:
parent
cbecfba0af
commit
76b24e64e8
@ -132,11 +132,11 @@ class DOMWorld {
|
||||
* @param {string} html
|
||||
*/
|
||||
async setContent(html) {
|
||||
await this.evaluate(base64html => {
|
||||
await this.evaluate(html => {
|
||||
document.open();
|
||||
document.write(decodeURIComponent(atob(base64html).split('').map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join('')));
|
||||
document.write(html);
|
||||
document.close();
|
||||
}, Buffer.from(html).toString('base64'));
|
||||
}, html);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -203,11 +203,11 @@ class DOMWorld {
|
||||
} = options;
|
||||
// We rely upon the fact that document.open() will reset frame lifecycle with "init"
|
||||
// lifecycle event. @see https://crrev.com/608658
|
||||
await this.evaluate(base64html => {
|
||||
await this.evaluate(html => {
|
||||
document.open();
|
||||
document.write(decodeURIComponent(atob(base64html).split('').map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join('')));
|
||||
document.write(html);
|
||||
document.close();
|
||||
}, Buffer.from(html).toString('base64'));
|
||||
}, html);
|
||||
const watcher = new LifecycleWatcher(this._frameManager, this._frame, waitUntil, timeout);
|
||||
const error = await Promise.race([
|
||||
watcher.timeoutOrTerminationPromise(),
|
||||
|
@ -8,7 +8,7 @@
|
||||
"node": ">=6.4.0"
|
||||
},
|
||||
"puppeteer": {
|
||||
"chromium_revision": "656675"
|
||||
"chromium_revision": "662092"
|
||||
},
|
||||
"scripts": {
|
||||
"unit": "node test/test.js",
|
||||
|
@ -85,7 +85,7 @@ module.exports.addTests = function({testRunner, expect}) {
|
||||
expect(await page.evaluate(a.sum, 1, 2)).toBe(3);
|
||||
expect(await page.evaluate(a.mult, 2, 4)).toBe(8);
|
||||
});
|
||||
xit('should work with unicode chars', async({page, server}) => {
|
||||
it('should work with unicode chars', async({page, server}) => {
|
||||
const result = await page.evaluate(a => a['中文字符'], {'中文字符': 42});
|
||||
expect(result).toBe(42);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user