Skip to content

Commit 0f63c02

Browse files
wwwillchenCommit bot
authored andcommitted
DevTools: skip specific tests for backwards compatibility testing
Created a new TestExpectations file for the backwards compatibility tests with specific reasons why certain types of tests are skipped. BUG=682078 Review-Url: https://codereview.chromium.org/2661573002 Cr-Commit-Position: refs/heads/master@{#446826}
1 parent 7a18812 commit 0f63c02

File tree

3 files changed

+68
-6
lines changed

3 files changed

+68
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"server": "node scripts/hosted_mode/server.js",
88
"test": "node scripts/npm_test.js",
99
"debug-test": "node scripts/npm_test.js --debug-devtools",
10+
"compat-test": "node scripts/npm_test.js --compat-protocol=1.2",
1011
"lint": "eslint front_end",
1112
"format": "node scripts/format.js",
1213
"closure": "python scripts/compile_frontend.py",

scripts/npm_test.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ var Flags = {
1313
DEBUG_DEVTOOLS: '--debug-devtools',
1414
DEBUG_DEVTOOLS_SHORTHAND: '-d',
1515
FETCH_CONTENT_SHELL: '--fetch-content-shell',
16-
COMPAT_PROTOCOL: '--compat-protocol',
16+
COMPAT_PROTOCOL: '--compat-protocol', // backwards compatibility testing
17+
CHROMIUM_PATH: '--chromium-path' // useful for bisecting
1718
};
1819

1920
var COMPAT_URL_MAPPING = {
@@ -23,17 +24,18 @@ var COMPAT_URL_MAPPING = {
2324
var IS_DEBUG_ENABLED =
2425
utils.includes(process.argv, Flags.DEBUG_DEVTOOLS) || utils.includes(process.argv, Flags.DEBUG_DEVTOOLS_SHORTHAND);
2526
var COMPAT_PROTOCOL = utils.parseArgs(process.argv)[Flags.COMPAT_PROTOCOL];
27+
var CUSTOM_CHROMIUM_PATH = utils.parseArgs(process.argv)[Flags.CHROMIUM_PATH];
2628
var IS_FETCH_CONTENT_SHELL = utils.includes(process.argv, Flags.FETCH_CONTENT_SHELL);
2729

2830
var CONTENT_SHELL_ZIP = 'content-shell.zip';
2931
var MAX_CONTENT_SHELLS = 10;
3032
var PLATFORM = getPlatform();
3133
var PYTHON = process.platform === 'win32' ? 'python.bat' : 'python';
3234

33-
var CHROMIUM_SRC_PATH = path.resolve(__dirname, '..', '..', '..', '..', '..');
35+
var CHROMIUM_SRC_PATH = CUSTOM_CHROMIUM_PATH || path.resolve(__dirname, '..', '..', '..', '..', '..');
3436
var RELEASE_PATH = path.resolve(CHROMIUM_SRC_PATH, 'out', 'Release');
3537
var BLINK_TEST_PATH = path.resolve(CHROMIUM_SRC_PATH, 'blink', 'tools', 'run_layout_tests.py');
36-
var DEVTOOLS_PATH = path.resolve(__dirname, '..');
38+
var DEVTOOLS_PATH = path.resolve(CHROMIUM_SRC_PATH, 'third_party', 'WebKit', 'Source', 'devtools');
3739
var CACHE_PATH = path.resolve(DEVTOOLS_PATH, '.test_cache');
3840
var SOURCE_PATH = path.resolve(DEVTOOLS_PATH, 'front_end');
3941

@@ -67,6 +69,7 @@ main();
6769

6870
function runCompatibilityTests() {
6971
const folder = `compat-protocol-${COMPAT_PROTOCOL}`;
72+
utils.removeRecursive(path.resolve(RELEASE_PATH, 'resources', 'inspector'));
7073
compileFrontend();
7174
var outPath = path.resolve(CACHE_PATH, folder, 'out');
7275
var contentShellDirPath = path.resolve(outPath, 'Release');
@@ -87,7 +90,7 @@ function runCompatibilityTests() {
8790
function compileFrontend() {
8891
console.log('Compiling devtools frontend');
8992
try {
90-
shell(`ninja -C ${RELEASE_PATH} devtools_frontend_resources`);
93+
shell(`ninja -C ${RELEASE_PATH} devtools_frontend_resources`, {cwd: CHROMIUM_SRC_PATH});
9194
} catch (err) {
9295
console.log(err.stdout.toString());
9396
console.log('ERROR: Cannot compile frontend\n' + err);
@@ -271,9 +274,12 @@ function runTests(buildDirectoryPath, useDebugDevtools) {
271274
console.log('TIP: You can debug a test using: npm run debug-test inspector/test-name.html');
272275

273276
if (COMPAT_PROTOCOL) {
274-
let platform = `protocol-${COMPAT_PROTOCOL}`;
275-
let compatBaselinePath = path.resolve(DEVTOOLS_PATH, 'tests', 'baseline', platform);
277+
const platform = `protocol-${COMPAT_PROTOCOL}`;
278+
const testsPath = path.resolve(DEVTOOLS_PATH, 'tests');
279+
const compatBaselinePath = path.resolve(testsPath, 'baseline', platform);
276280
testArgs.push(`--additional-platform-directory=${compatBaselinePath}`);
281+
const expectationsPath = path.resolve(testsPath, 'TestExpectations');
282+
testArgs.push(`--additional-expectations=${expectationsPath}`);
277283
}
278284
if (IS_DEBUG_ENABLED) {
279285
testArgs.push('--additional-driver-flag=--remote-debugging-port=9222');

tests/TestExpectations

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Skipping service worker tests b/c migration from ServiceWorker domain to Target domain
2+
# https://crrev.com/c2cea7d490e0b9ec93b72b0e00502bb9fa79f10a
3+
http/tests/inspector/elements/event-listeners-framework-with-service-worker.html [ Skip ]
4+
http/tests/inspector/service-workers/lazy-addeventlisteners.html [ Skip ]
5+
http/tests/inspector/service-workers/service-worker-agents.html [ Skip ]
6+
http/tests/inspector/service-workers/service-worker-manager.html [ Skip ]
7+
http/tests/inspector/service-workers/service-worker-pause.html [ Skip ]
8+
http/tests/inspector/service-workers/service-workers-force-update-on-page-load.html [ Skip ]
9+
http/tests/inspector/service-workers/service-workers-navigation-preload.html [ Skip ]
10+
http/tests/inspector/service-workers/service-workers-redundant.html [ Skip ]
11+
http/tests/inspector/service-workers/service-workers-view.html [ Skip ]
12+
http/tests/inspector/service-workers/service-workers-bypass-for-network-redirect.html [ Skip ]
13+
14+
# Skipping worker tests b/c migration from Worker domain to Target domain
15+
# https://crrev.com/14d5ae1493499885e5f9820490e77aef43d0d083
16+
http/tests/inspector-enabled/dedicated-workers-list.html [ Skip ]
17+
http/tests/inspector/sources/debugger/worker-debugging-script-mapping.html [ Skip ]
18+
http/tests/inspector/sources/debugger/worker-debugging.html [ Skip ]
19+
inspector/console/console-revoke-error-in-worker.html [ Skip ]
20+
inspector/console/worker-eval-contains-stack.html [ Skip ]
21+
inspector/sources/debugger-frameworks/frameworks-with-worker.html [ Skip ]
22+
inspector/sources/debugger-ui/script-snippet-model.html [ Skip ] # TODO(chenwilliam): extract the worker test
23+
24+
# Skipping accessibility tests b/c of protocol change
25+
# https://crrev.com/3a46cc72d58945804dd4919a679a8ce26690bfc0
26+
inspector-protocol/accessibility/accessibility-getNodeWithNoAXNode.html [ Skip ]
27+
inspector-protocol/accessibility/accessibility-getRelationships.html [ Skip ]
28+
inspector-protocol/accessibility/accessibility-ignoredNodes.html [ Skip ]
29+
inspector-protocol/accessibility/accessibility-ignoredNodesModal.html [ Skip ]
30+
inspector-protocol/accessibility/accessibility-nameSources-buttons.html [ Skip ]
31+
inspector-protocol/accessibility/accessibility-nameSources-img-figure.html [ Skip ]
32+
inspector-protocol/accessibility/accessibility-nameSources-input-buttons.html [ Skip ]
33+
inspector-protocol/accessibility/accessibility-nameSources-input.html [ Skip ]
34+
inspector-protocol/accessibility/accessibility-nameSources-labelledby.html [ Skip ]
35+
inspector-protocol/accessibility/accessibility-nameSources-summary.html [ Skip ]
36+
inspector-protocol/accessibility/accessibility-nameSources-visiblity.html [ Skip ]
37+
38+
# Skipping async await tests b/c 1.2 content shell (DevTools runtime) does not
39+
# support async await
40+
inspector/sources/debugger-async/async-await/async-callstack-async-await1.html [ Skip ]
41+
inspector/sources/debugger-async/async-await/async-callstack-async-await2.html [ Skip ]
42+
inspector/sources/debugger-async/async-await/async-callstack-async-await3.html [ Skip ]
43+
inspector/sources/debugger-async/async-await/async-pause-on-exception.html [ Skip ]
44+
inspector/sources/debugger-ui/async-call-stack-async-function.html [ Skip ]
45+
46+
# 1.2 content shell does not support inspector-unit
47+
http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js [ Skip ]
48+
http/tests/inspector-unit/list-control-equal-height.js [ Skip ]
49+
http/tests/inspector-unit/list-control-non-viewport.js [ Skip ]
50+
http/tests/inspector-unit/list-control-various-height.js [ Skip ]
51+
http/tests/inspector-unit/suggest-box.js [ Skip ]
52+
http/tests/inspector-unit/test-failure.js [ Skip ]
53+
http/tests/inspector-unit/text-prompt-hint.js [ Skip ]
54+
http/tests/inspector-unit/text-prompt.js [ Skip ]
55+
http/tests/inspector-unit/trie.js [ Skip ]

0 commit comments

Comments
 (0)