-
Notifications
You must be signed in to change notification settings - Fork 122
feat: support load bts chunk from remote address #1834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "@lynx-js/web-worker-runtime": patch | ||
| "@lynx-js/web-constants": patch | ||
| "@lynx-js/web-core": patch | ||
| --- | ||
|
|
||
| feat: support load bts chunk from remote address | ||
|
|
||
| - re-support chunk splitting | ||
| - support lynx.requireModule with a json file | ||
| - support lynx.requireModule, lynx.requireModuleAsync with a remote url | ||
| - support to add a breakpoint in chrome after reloading the web page |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| // Copyright 2024 The Lynx Authors. All rights reserved. | ||
| // Licensed under the Apache License Version 2.0 that can be found in the | ||
| // LICENSE file in the root directory of this source tree. | ||
|
|
@@ -23,7 +23,7 @@ | |
| ReturnType<typeof expect<Page>>['toHaveScreenshot'] | ||
| >[0], | ||
| ) => { | ||
| await expect(page).toHaveScreenshot([ | ||
|
Check failure on line 26 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| `${caseName}`, | ||
| `${subcaseName}`, | ||
| `${label}.png`, | ||
|
|
@@ -71,7 +71,7 @@ | |
| await goto(page, title); | ||
| await wait(100); | ||
| const target = await page.locator('#target'); | ||
| await expect(target).toHaveCSS('height', '100px'); | ||
|
Check failure on line 74 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await expect(target).toHaveCSS('width', '100px'); | ||
| await expect(target).toHaveCSS('background-color', 'rgb(255, 192, 203)'); | ||
| }); | ||
|
|
@@ -81,7 +81,7 @@ | |
| await goto(page, title); | ||
| await wait(100); | ||
| const target = page.locator('#target'); | ||
| await target.click(); | ||
|
Check failure on line 84 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await wait(100); | ||
| await expect(await target.getAttribute('style')).toContain('green'); | ||
| await page.evaluate(() => { | ||
|
|
@@ -107,13 +107,13 @@ | |
| ) | ||
| .filter(i => i.getAttribute('lynx-tag') === 'page').length | ||
| ), | ||
| ).toBe(1); | ||
|
Check failure on line 110 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| }); | ||
| test('basic-bindtap', async ({ page }, { title }) => { | ||
| await goto(page, title); | ||
| await wait(100); | ||
| const target = page.locator('#target'); | ||
| await target.click(); | ||
|
Check failure on line 116 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await wait(100); | ||
| await expect(await target.getAttribute('style')).toContain('green'); | ||
| await target.click(); | ||
|
|
@@ -124,7 +124,7 @@ | |
| await goto(page, title); | ||
| await wait(100); | ||
| const target = page.locator('#target'); | ||
| await target.click(); | ||
|
Check failure on line 127 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await wait(100); | ||
| await expect(await target.getAttribute('style')).toContain('green'); | ||
| await target.click(); | ||
|
|
@@ -379,7 +379,7 @@ | |
| xDistance: 10, | ||
| yDistance: 0, | ||
| }); | ||
| expect(page.locator('#target1'), 'has touches').toHaveCSS( | ||
|
Check failure on line 382 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| 'background-color', | ||
| 'rgb(0, 128, 0)', | ||
| ); // green | ||
|
|
@@ -1593,7 +1593,7 @@ | |
| await goto(page, title); | ||
| await wait(100); | ||
| const target = page.locator('#target'); | ||
| await expect(target).toHaveCSS('background-color', 'rgb(255, 192, 203)'); // pink | ||
|
Check failure on line 1596 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await page.evaluate(() => { | ||
| // @ts-expect-error | ||
| globalThis.lynxView.sendGlobalEvent('event-test', ['change']); | ||
|
|
@@ -1608,7 +1608,7 @@ | |
| await goto(page, title); | ||
| await wait(100); | ||
| const result = page.locator('#result'); | ||
| await expect(result).toHaveCSS('background-color', 'rgb(255, 192, 203)'); // pink | ||
|
Check failure on line 1611 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await page.locator('#target').click(); | ||
| await wait(100); | ||
| await expect(result).toHaveCSS('background-color', 'rgb(0, 128, 0)'); // green | ||
|
|
@@ -1617,7 +1617,7 @@ | |
| await goto(page, title); | ||
| await wait(100); | ||
| const result = page.locator('#result'); | ||
| await expect(result).toHaveCSS('background-color', 'rgb(255, 192, 203)'); // pink | ||
|
Check failure on line 1620 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| await page.locator('#target').click(); | ||
| await wait(100); | ||
| await expect(result).toHaveCSS('background-color', 'rgb(0, 128, 0)'); // green | ||
|
|
@@ -1672,8 +1672,8 @@ | |
| }); | ||
| await goto(page, title); | ||
| await wait(200); | ||
| !isSSR && expect(mts).toBe(true); | ||
|
Check failure on line 1675 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| expect(bts).toBe(true); | ||
|
Check failure on line 1676 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| }, | ||
| ); | ||
| test( | ||
|
|
@@ -1691,7 +1691,7 @@ | |
| }); | ||
| await goto(page, title); | ||
| await wait(200); | ||
| !isSSR && expect(mts).toBe(true); | ||
|
Check failure on line 1694 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| expect(bts).toBe(true); | ||
| }, | ||
| ); | ||
|
|
@@ -1872,7 +1872,6 @@ | |
| test( | ||
| 'config-splitchunk-split-by-experience', | ||
| async ({ page }, { title }) => { | ||
| test.skip(true, 'incorrectly implemented test case'); | ||
| await goto(page, title, undefined, true); | ||
| await wait(1500); | ||
| const target = page.locator('#target'); | ||
|
|
@@ -1882,7 +1881,6 @@ | |
| test( | ||
| 'config-splitchunk-split-by-module', | ||
| async ({ page }, { title }) => { | ||
| test.skip(true, 'incorrectly implemented test case'); | ||
| await goto(page, title, undefined, true); | ||
| await wait(1500); | ||
| const target = page.locator('#target'); | ||
|
|
@@ -2196,7 +2194,7 @@ | |
| await wait(300); | ||
| // --initialtextinitial | ||
| let count = await page.getByText('--').count(); | ||
| expect(count).toBe(1); | ||
|
Check failure on line 2197 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| count = await page.getByText('initial').count(); | ||
| expect(count).toBeGreaterThanOrEqual(1); | ||
| await page.locator('#target').click(); | ||
|
|
@@ -2901,7 +2899,7 @@ | |
| await page.locator('input').press('Enter'); | ||
| await wait(100); | ||
| const result = await page.locator('.result').first().innerText(); | ||
| expect(result).toBe('bindconfirm'); | ||
|
Check failure on line 2902 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| }); | ||
| // input/bindconfirm test-case end | ||
|
|
||
|
|
@@ -2950,7 +2948,7 @@ | |
| )?.click(); | ||
| }); | ||
| await wait(200); | ||
| expect(val).toBe(true); | ||
|
Check failure on line 2951 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| expect(selectionBegin).toBe(true); | ||
| expect(selectionEnd).toBe(true); | ||
| }, | ||
|
|
@@ -4220,7 +4218,7 @@ | |
| // NOTE: dataset is not included in the previous json value, so we should | ||
| // manually find it from the JSHandle. | ||
| const dataset = await ( | ||
| await (await msg.args()[0]!.getProperty('target')).getProperty( | ||
|
Check failure on line 4221 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| 'dataset', | ||
| ) | ||
| ).jsonValue(); | ||
|
|
@@ -4259,7 +4257,7 @@ | |
| await wait(100); | ||
| expect(bindblur).toBeTruthy(); | ||
| expect(bindfocus).toBeTruthy(); | ||
| expect(bindinput).toBeTruthy(); | ||
|
Check failure on line 4260 in packages/web-platform/web-tests/tests/react.spec.ts
|
||
| }, | ||
| ); | ||
| // x-textarea/bindinput test-case end | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.