chore: 整理 third-party Dark Reader 目录并移除本地说明文件跟踪

This commit is contained in:
2026-08-08 17:38:08 +08:00
parent 202ab537d1
commit 0bb552b026
1004 changed files with 115066 additions and 20081 deletions
@@ -0,0 +1,82 @@
import {multiline} from '../../support/test-utils';
import type {StyleExpectations} from '../globals';
async function loadBasicPage() {
await loadTestPage({
'/': multiline(
'<!DOCTYPE html>',
'<html>',
'<head>',
' <style>',
' h1 { color: red; }',
' </style>',
'</head>',
'<body>',
' <h1>E2E test page</h1>',
' <p>Text</p>',
' <a href="#">Link</a>',
'</body>',
'</html>',
),
});
}
async function expectStyles(styles: StyleExpectations) {
await expectPageStyles(expect, styles);
}
describe('Modifying config via Developer tools', () => {
it('Modifying config', async () => {
await loadBasicPage();
await expectStyles([
['document', 'background-color', 'rgb(24, 26, 27)'],
['document', 'color', 'rgb(232, 230, 227)'],
['body', 'background-color', 'rgb(24, 26, 27)'],
['body', 'color', 'rgb(232, 230, 227)'],
['h1', 'color', 'rgb(255, 26, 26)'],
['a', 'color', 'rgb(51, 145, 255)'],
]);
await devtoolsUtils.paste([
'*',
'',
'CSS',
'h1 {',
' background: black;',
' color: white;',
'}',
'',
'============================',
'',
'nonexistent.com',
'',
'CSS',
'h1 {',
' color: red;',
'}',
'',
].join('\n'));
await expectStyles([
['document', 'background-color', 'rgb(24, 26, 27)'],
['document', 'color', 'rgb(232, 230, 227)'],
['body', 'background-color', 'rgb(24, 26, 27)'],
['body', 'color', 'rgb(232, 230, 227)'],
['h1', 'background-color', 'rgb(0, 0, 0)'],
['h1', 'color', 'rgb(255, 255, 255)'],
['a', 'color', 'rgb(51, 145, 255)'],
]);
await devtoolsUtils.reset();
await expectStyles([
['document', 'background-color', 'rgb(24, 26, 27)'],
['document', 'color', 'rgb(232, 230, 227)'],
['body', 'background-color', 'rgb(24, 26, 27)'],
['body', 'color', 'rgb(232, 230, 227)'],
['h1', 'color', 'rgb(255, 26, 26)'],
['a', 'color', 'rgb(51, 145, 255)'],
]);
});
});