From 37c8fa4a4b7ea3a2a61f48aea79ebc5bcecb71e5 Mon Sep 17 00:00:00 2001 From: Benedikt Meurer Date: Tue, 25 Oct 2022 19:16:59 +0000 Subject: [PATCH] [DevTools] Remove bogus web test for OutlineQuickOpen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This web test makes tricky implementation assumptions (refresh method being called), which blocks refactoring the OutlineQuickOpen unnecessarily. Bug: chromium:1377747 Change-Id: I3dc23939722e5a90349359ec72c2d7f880260c42 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3975830 Commit-Queue: Benedikt Meurer Commit-Queue: Simon Zünd Quick-Run: Benedikt Meurer Reviewed-by: Simon Zünd Cr-Commit-Position: refs/heads/main@{#1063435} --- .../javascript-outline-dialog-expected.txt | 23 ----------- .../sources/javascript-outline-dialog.js | 38 ------------------- .../resources/javascript-outline-dialog.js | 3 -- 3 files changed, 64 deletions(-) delete mode 100644 third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog-expected.txt delete mode 100644 third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog.js delete mode 100644 third_party/blink/web_tests/http/tests/devtools/sources/resources/javascript-outline-dialog.js diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog-expected.txt b/third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog-expected.txt deleted file mode 100644 index c72dcfc72992ce..00000000000000 --- a/third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog-expected.txt +++ /dev/null @@ -1,23 +0,0 @@ -Verify JavaScriptOutlineDialog scoring. - -Scores for query="te" -testFoo(arg2) -1 -test(arg1) -2 -testBar(arg3) -3 - -Scores for query="test" -test(arg1) 0.5 -testFoo(arg2) -1 -testBar(arg3) -3 - -Scores for query="test(" -test(arg1) 0.5 -testFoo(arg2) -1 -testBar(arg3) -3 - -Scores for query="test(arg" -test(arg1) 0.5 -testFoo(arg2) -1 -testBar(arg3) -3 - - diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog.js b/third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog.js deleted file mode 100644 index e39af4867e13cc..00000000000000 --- a/third_party/blink/web_tests/http/tests/devtools/sources/javascript-outline-dialog.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2017 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -(async function() { - TestRunner.addResult(`Verify JavaScriptOutlineDialog scoring.\n`); - await TestRunner.loadLegacyModule('sources'); await TestRunner.loadTestModule('sources_test_runner'); - await TestRunner.showPanel('sources'); - - await TestRunner.addScriptTag('resources/javascript-outline-dialog.js'); - - SourcesTestRunner.showScriptSource('javascript-outline-dialog.js', onSourceShown); - var provider; - function onSourceShown(sourceFrame) { - TestRunner.addSniffer(Sources.OutlineQuickOpen.prototype, 'refresh', onQuickOpenFulfilled); - UI.panels.sources.sourcesView().showOutlineQuickOpen(); - } - - function onQuickOpenFulfilled() { - provider = this; - dumpScores('te'); - dumpScores('test'); - dumpScores('test('); - dumpScores('test(arg'); - TestRunner.completeTest(); - } - - function dumpScores(query) { - TestRunner.addResult(`Scores for query="${query}"`); - var keys = []; - for (var i = 0; i < provider.itemCount(); ++i) { - keys.push({key: provider.itemKeyAt(i), score: provider.itemScoreAt(i, query)}); - } - keys.sort((a, b) => b.score - a.score); - TestRunner.addResult(keys.map(a => a.key + ' ' + a.score).join('\n')); - TestRunner.addResult(''); - } -})(); diff --git a/third_party/blink/web_tests/http/tests/devtools/sources/resources/javascript-outline-dialog.js b/third_party/blink/web_tests/http/tests/devtools/sources/resources/javascript-outline-dialog.js deleted file mode 100644 index 25dbad78f989bf..00000000000000 --- a/third_party/blink/web_tests/http/tests/devtools/sources/resources/javascript-outline-dialog.js +++ /dev/null @@ -1,3 +0,0 @@ -function testFoo(arg2) { } -function test(arg1) { } -function testBar(arg3) { }