diff --git a/.eslintignore b/.eslintignore index 219565741c..d148adc291 100644 --- a/.eslintignore +++ b/.eslintignore @@ -14,8 +14,5 @@ front_end/protocol_externs.js front_end/javascript_metadata/NativeFunctions.js front_end/sdk/wasm_source_map/pkg/wasm_source_map.js front_end/third_party/ -test/e2e/resources/ -test/webtests/ -scripts/ test/e2e/**/*.js test/shared/**/*.js diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 58b1101f6a..f9b734a693 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -116,29 +116,7 @@ def _CheckFormat(input_api, output_api): def popen(args): return input_api.subprocess.Popen(args=args, stdout=input_api.subprocess.PIPE, stderr=input_api.subprocess.STDOUT) - affected_files = _getAffectedJSFiles(input_api) - if len(affected_files) == 0: - return results - original_sys_path = sys.path - try: - sys.path = sys.path + [input_api.os_path.join(input_api.PresubmitLocalPath(), 'scripts')] - import devtools_paths - finally: - sys.path = original_sys_path - - ignore_files = [] - eslint_ignore_path = input_api.os_path.join(input_api.PresubmitLocalPath(), '.eslintignore') - with open(eslint_ignore_path, 'r') as ignore_manifest: - for line in ignore_manifest: - if '*' not in line.strip(): - ignore_files.append(input_api.os_path.normpath(line.strip())) - formattable_files = [ - affected_file for affected_file in affected_files if all(ignore_file not in affected_file for ignore_file in ignore_files) - ] - if len(formattable_files) == 0: - return results - - format_args = ['git', 'cl', 'format', '--js'] + formattable_files + format_args = ['git', 'cl', 'format', '--js'] format_process = popen(format_args) format_out, _ = format_process.communicate() if format_process.returncode != 0: diff --git a/front_end/cm/.clang-format b/front_end/cm/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/cm/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/cm_headless/.clang-format b/front_end/cm_headless/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/cm_headless/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/cm_modes/.clang-format b/front_end/cm_modes/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/cm_modes/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/cm_web_modes/.clang-format b/front_end/cm_web_modes/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/cm_web_modes/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/diff/.clang-format b/front_end/diff/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/diff/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/formatter_worker/acorn/.clang-format b/front_end/formatter_worker/acorn/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/formatter_worker/acorn/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/sdk/wasm_source_map/.clang-format b/front_end/sdk/wasm_source_map/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/sdk/wasm_source_map/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/front_end/third_party/.clang-format b/front_end/third_party/.clang-format new file mode 100644 index 0000000000..37f3d57668 --- /dev/null +++ b/front_end/third_party/.clang-format @@ -0,0 +1 @@ +DisableFormat: true \ No newline at end of file diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/clear-storage-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/clear-storage-a11y-test.js index b640b8d9bd..71f2ea0775 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/clear-storage-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/clear-storage-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. (async function() { - TestRunner.addResult(`Tests accessibility in the Clear Storage view using the axe-core linter.`); + TestRunner.addResult('Tests accessibility in the Clear Storage view using the axe-core linter.'); await TestRunner.loadModule('application_test_runner'); await TestRunner.loadModule('axe_core_test_runner'); await ApplicationTestRunner.resetState(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/service-worker-view-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/service-worker-view-a11y-test.js index 341f699545..35b37fae34 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/service-worker-view-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/application-panel/service-worker-view-a11y-test.js @@ -3,7 +3,7 @@ // found in the LICENSE file. (async function() { - TestRunner.addResult(`Tests accessibility of ServiceWorkersView on application panel.`); + TestRunner.addResult('Tests accessibility of ServiceWorkersView on application panel.'); await TestRunner.loadModule('axe_core_test_runner'); await TestRunner.loadModule('application_test_runner'); await ApplicationTestRunner.resetState(); @@ -22,4 +22,4 @@ await AxeCoreTestRunner.runValidation(element); TestRunner.completeTest(); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/basic-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/basic-a11y-test.js index 59cbeba977..dff5de4203 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/basic-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/basic-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { await TestRunner.loadModule('axe_core_test_runner'); const locationsToTest = [ @@ -14,13 +14,14 @@ 'sensors', ]; - //TODO(crbug.com/1004940): exclude scrollable-region-focusable for performance.monitor only + // TODO(crbug.com/1004940): exclude scrollable-region-focusable for performance.monitor only const NO_SCROLLABLE_REGION_FOCUSABLE_RULESET = { 'scrollable-region-focusable': { enabled: false, }, }; - for (const location of locationsToTest) + for (const location of locationsToTest) { await loadViewAndTestElementViolations(location); + } TestRunner.completeTest(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/elements/main-tool-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/elements/main-tool-test.js index 10da2f1b34..8e2d1ee023 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/elements/main-tool-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/elements/main-tool-test.js @@ -2,62 +2,62 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { - // axe-core issue #1444 -- role="tree" requires children with role="treeitem", - // but it is reasonable to have trees with no leaves. - const NO_REQUIRED_CHILDREN_RULESET = { - 'aria-required-children': { - enabled: false, - }, - }; - const DEFAULT_RULESET = { }; - await TestRunner.loadModule('axe_core_test_runner'); - await TestRunner.loadModule('elements_test_runner'); - const tests = [ - testElementsDomTree, - testElementsDomBreadcrumbs, - testElementsStylesPane, - testElementsComputedStylesPane, - ]; +(async function() { + // axe-core issue #1444 -- role="tree" requires children with role="treeitem", + // but it is reasonable to have trees with no leaves. + const NO_REQUIRED_CHILDREN_RULESET = { + 'aria-required-children': { + enabled: false, + }, + }; + const DEFAULT_RULESET = {}; + await TestRunner.loadModule('axe_core_test_runner'); + await TestRunner.loadModule('elements_test_runner'); + const tests = [ + testElementsDomTree, + testElementsDomBreadcrumbs, + testElementsStylesPane, + testElementsComputedStylesPane, + ]; - async function testElementsDomTree() { - TestRunner.addResult('Tests accessibility in the DOM tree using the axe-core linter'); - const view = 'elements'; - await UI.viewManager.showView(view); - const widget = await UI.viewManager.view(view).widget(); - const element = widget.element.querySelector('#elements-content'); + async function testElementsDomTree() { + TestRunner.addResult('Tests accessibility in the DOM tree using the axe-core linter'); + const view = 'elements'; + await UI.viewManager.showView(view); + const widget = await UI.viewManager.view(view).widget(); + const element = widget.element.querySelector('#elements-content'); - await AxeCoreTestRunner.runValidation(element, NO_REQUIRED_CHILDREN_RULESET); - } + await AxeCoreTestRunner.runValidation(element, NO_REQUIRED_CHILDREN_RULESET); + } - async function testElementsDomBreadcrumbs() { - TestRunner.addResult('Tests accessibility in the DOM breadcrumbs using the axe-core linter'); - const view = 'elements'; - await UI.viewManager.showView(view); - const widget = await UI.viewManager.view(view).widget(); - const element = widget.element.querySelector('#elements-crumbs'); + async function testElementsDomBreadcrumbs() { + TestRunner.addResult('Tests accessibility in the DOM breadcrumbs using the axe-core linter'); + const view = 'elements'; + await UI.viewManager.showView(view); + const widget = await UI.viewManager.view(view).widget(); + const element = widget.element.querySelector('#elements-crumbs'); - await AxeCoreTestRunner.runValidation(element, DEFAULT_RULESET); - } + await AxeCoreTestRunner.runValidation(element, DEFAULT_RULESET); + } - async function testElementsStylesPane() { - TestRunner.addResult('Tests accessibility of the Styles pane using the axe-core linter'); - await UI.viewManager.showView('elements'); - const panel = self.runtime.sharedInstance(Elements.ElementsPanel); - const element = panel._stylesWidget.element; + async function testElementsStylesPane() { + TestRunner.addResult('Tests accessibility of the Styles pane using the axe-core linter'); + await UI.viewManager.showView('elements'); + const panel = self.runtime.sharedInstance(Elements.ElementsPanel); + const element = panel._stylesWidget.element; - await AxeCoreTestRunner.runValidation(element, NO_REQUIRED_CHILDREN_RULESET); - } + await AxeCoreTestRunner.runValidation(element, NO_REQUIRED_CHILDREN_RULESET); + } - async function testElementsComputedStylesPane() { - TestRunner.addResult('Tests accessibility in the Computed Styles pane using the axe-core linter'); - await UI.viewManager.showView('elements'); - await ElementsTestRunner.showComputedStyles(); - const panel = self.runtime.sharedInstance(Elements.ElementsPanel); - const element = panel._computedStyleWidget.element; + async function testElementsComputedStylesPane() { + TestRunner.addResult('Tests accessibility in the Computed Styles pane using the axe-core linter'); + await UI.viewManager.showView('elements'); + await ElementsTestRunner.showComputedStyles(); + const panel = self.runtime.sharedInstance(Elements.ElementsPanel); + const element = panel._computedStyleWidget.element; - await AxeCoreTestRunner.runValidation(element, DEFAULT_RULESET); - } + await AxeCoreTestRunner.runValidation(element, DEFAULT_RULESET); + } - TestRunner.runAsyncTestSuite(tests); - })(); \ No newline at end of file + TestRunner.runAsyncTestSuite(tests); +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/lighthouse-start-view-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/lighthouse-start-view-a11y-test.js index 93a3d6bc0c..2b22ab216b 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/lighthouse-start-view-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/lighthouse-start-view-a11y-test.js @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { - TestRunner.addResult('Tests accessibility in the lighthouse start view using the axe-core linter.\n'); - await TestRunner.loadModule('axe_core_test_runner'); - await TestRunner.loadModule('lighthouse_test_runner'); - await TestRunner.showPanel('lighthouse'); - await AxeCoreTestRunner.runValidation(LighthouseTestRunner.getContainerElement()); - TestRunner.completeTest(); +(async function() { + TestRunner.addResult('Tests accessibility in the lighthouse start view using the axe-core linter.\n'); + await TestRunner.loadModule('axe_core_test_runner'); + await TestRunner.loadModule('lighthouse_test_runner'); + await TestRunner.showPanel('lighthouse'); + await AxeCoreTestRunner.runValidation(LighthouseTestRunner.getContainerElement()); + TestRunner.completeTest(); })(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js index 33175c6d8b..67f1c49a98 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js @@ -3,7 +3,7 @@ // found in the LICENSE file. (async function() { - TestRunner.addResult(`Tests accessibility in heap profiler using the axe-core linter.`); + TestRunner.addResult('Tests accessibility in heap profiler using the axe-core linter.'); await TestRunner.loadModule('axe_core_test_runner'); await TestRunner.loadModule('heap_profiler_test_runner'); await TestRunner.showPanel('heap_profiler'); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/network/network-condition-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/network/network-condition-a11y-test.js index 6e6699b8f6..bb610e248f 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/network/network-condition-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/network/network-condition-a11y-test.js @@ -12,4 +12,4 @@ await AxeCoreTestRunner.runValidation(widget.element); TestRunner.completeTest(); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/performance/landing-page-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/performance/landing-page-a11y-test.js index 982b291b08..6a749abdf6 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/performance/landing-page-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/performance/landing-page-a11y-test.js @@ -12,4 +12,4 @@ await AxeCoreTestRunner.runValidation(widget.element); TestRunner.completeTest(); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js index c266c9c987..4bd099a236 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js @@ -41,7 +41,7 @@ PerformanceTestRunner.createPerformanceModelWithEvents(testData); async function testDetailsView() { - TestRunner.addResult(`Tests accessibility in performance Details view using the axe-core linter`); + TestRunner.addResult('Tests accessibility in performance Details view using the axe-core linter'); const detailsView = runtime.sharedInstance(Timeline.TimelineDetailsView); // Details pane gets data from the parent TimelineDetails view @@ -82,4 +82,4 @@ testBottomUpView, testCallTreeView, ]); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/quick-open-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/quick-open-a11y-test.js index ce0aea3f4b..e30b7596f0 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/quick-open-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/quick-open-a11y-test.js @@ -3,7 +3,7 @@ // found in the LICENSE file. (async function() { - TestRunner.addResult(`Test accessibility in Quick Open dialog\n`); + TestRunner.addResult('Test accessibility in Quick Open dialog\n'); await self.runtime.loadModulePromise('quick_open'); await TestRunner.loadModule('axe_core_test_runner'); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/rendering/basic-rendering-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/rendering/basic-rendering-a11y-test.js index a171697ef4..1dbd5b4207 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/rendering/basic-rendering-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/rendering/basic-rendering-a11y-test.js @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { await TestRunner.loadModule('axe_core_test_runner'); - TestRunner.addResult(`Tests accessibility in the rendering view using the axe-core linter.`); + TestRunner.addResult('Tests accessibility in the rendering view using the axe-core linter.'); await UI.viewManager.showView('rendering'); const renderingView = await UI.viewManager.view('rendering').widget(); await AxeCoreTestRunner.runValidation(renderingView.element); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/security/security-origin-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/security/security-origin-a11y-test.js index 65a904f002..a4cc9d9f35 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/security/security-origin-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/security/security-origin-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { await TestRunner.loadModule('security_test_runner'); await TestRunner.loadModule('axe_core_test_runner'); await TestRunner.showPanel('security'); @@ -29,7 +29,7 @@ SecurityTestRunner.dispatchRequestFinished(request1); const securityPanel = runtime.sharedInstance(Security.SecurityPanel); - securityPanel.showOrigin("https://foo.test"); + securityPanel.showOrigin('https://foo.test'); await AxeCoreTestRunner.runValidation(securityPanel.contentElement); TestRunner.completeTest(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/settings/blackbox-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/settings/blackbox-a11y-test.js index 4e6a192e92..2db715ca65 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/settings/blackbox-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/settings/blackbox-a11y-test.js @@ -39,4 +39,4 @@ } TestRunner.runAsyncTestSuite([testAddPattern, testPatternList, testPatternError]); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/settings/emulated-device-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/settings/emulated-device-a11y-test.js index a6910f8138..20efb2181d 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/settings/emulated-device-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/settings/emulated-device-a11y-test.js @@ -11,7 +11,7 @@ const addDeviceButton = devicesWidget._defaultFocusedElement; addDeviceButton.click(); - TestRunner.addResult(`Invalidating the device pixel ratio`); + TestRunner.addResult('Invalidating the device pixel ratio'); const editor = devicesWidget._list._editor; const title = editor.control('title'); const width = editor.control('width'); @@ -28,4 +28,4 @@ } TestRunner.runAsyncTestSuite([testNewDeviceError]); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/settings/geolocations-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/settings/geolocations-a11y-test.js index 84835375ee..40e54591a8 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/settings/geolocations-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/settings/geolocations-a11y-test.js @@ -51,4 +51,4 @@ } TestRunner.runAsyncTestSuite([testAddLocation, testNewLocationError]); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/settings/shortcuts-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/settings/shortcuts-a11y-test.js index 29bdeba807..84d653b98f 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/settings/shortcuts-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/settings/shortcuts-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the settings tool shortcuts pane using the axe-core linter.'); await TestRunner.loadModule('axe_core_test_runner'); @@ -18,4 +18,4 @@ } TestRunner.runAsyncTestSuite([testShortcuts]); -})(); \ No newline at end of file +})(); diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/global-listeners-sidebar-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/global-listeners-sidebar-a11y-test.js index 4069fa02e5..02811a7ded 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/global-listeners-sidebar-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/global-listeners-sidebar-a11y-test.js @@ -10,7 +10,7 @@ await TestRunner.navigatePromise('../sources/debugger-breakpoints/resources/dom-breakpoints.html'); TestRunner.addResult('Adding global listener.'); - await TestRunner.evaluateInPagePromise(`window.addEventListener('touchstart', () => console.log);`); + await TestRunner.evaluateInPagePromise('window.addEventListener(\'touchstart\', () => console.log);'); await UI.viewManager.showView('sources.globalListeners'); const globalListenersPane = self.runtime.sharedInstance(BrowserDebugger.ObjectEventListenersSidebarPane); const eventListenersView = globalListenersPane._eventListenersView; diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/javascript-breakpoints-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/javascript-breakpoints-a11y-test.js index a8be4dd021..bfca3566bc 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/javascript-breakpoints-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/javascript-breakpoints-a11y-test.js @@ -12,8 +12,8 @@ const sourceFrame = await SourcesTestRunner.showScriptSourcePromise('set-breakpoint.html'); TestRunner.addResult('Setting a breakpoint.'); - await SourcesTestRunner.createNewBreakpoint(sourceFrame, 13, '', true) - await SourcesTestRunner.createNewBreakpoint(sourceFrame, 11, '', false) + await SourcesTestRunner.createNewBreakpoint(sourceFrame, 13, '', true); + await SourcesTestRunner.createNewBreakpoint(sourceFrame, 11, '', false); await UI.viewManager.showView('sources.jsBreakpoints'); const breakpointsPaneElement = runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).contentElement; diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-contentscripts-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-contentscripts-a11y-test.js index 5df6ba3ddd..5475147498 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-contentscripts-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-contentscripts-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the Sources panel Navigator pane Contentscripts tab using axe-core.'); // axe-core issue #1444 -- role="tree" requires children with role="treeitem", @@ -26,11 +26,11 @@ async function setup() { // Add content scripts - var pageMock = new SDKTestRunner.PageMock('http://example.com'); + const pageMock = new SDKTestRunner.PageMock('http://example.com'); pageMock.connectAsMainTarget('page-target'); const url = 'contentScript1.js'; pageMock.evalScript(url, 'var script', true /* isContentScript */); - await TestRunner.waitForUISourceCode(url) + await TestRunner.waitForUISourceCode(url); } async function testA11yForView(ruleSet) { diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-filesystem-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-filesystem-a11y-test.js index 17cb15f810..e5d0205560 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-filesystem-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-filesystem-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the Sources panel Navigator pane FileSystem tab using axe-core.'); // axe-core issue #1444 -- role="tree" requires children with role="treeitem", diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-network-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-network-a11y-test.js index 84864223da..09ea637693 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-network-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-network-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the Sources panel Navigator pane Network tab using axe-core.'); // axe-core issue #1444 -- role="tree" requires children with role="treeitem", diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-overrides-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-overrides-a11y-test.js index 695dea6c8b..4f007d5a13 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-overrides-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-overrides-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the Sources panel Navigator pane Overrides tab using axe-core.'); // axe-core issue #1444 -- role="tree" requires children with role="treeitem", diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-snippets-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-snippets-a11y-test.js index 0a1c6e97f8..389dc281ac 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-snippets-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/source-navigator-snippets-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the Sources panel Navigator pane Snippets tab using axe-core.'); // axe-core issue #1444 -- role="tree" requires children with role="treeitem", diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js index edea7c3439..85035c9bec 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests accessibility in the editor pane in sources panel using the axe-core linter.'); // axe-core issue #1444 -- role="tree" requires children with role="treeitem", diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/xhr-breakpoints-sidebar-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/xhr-breakpoints-sidebar-a11y-test.js index 97d840104b..19dbed4e24 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/xhr-breakpoints-sidebar-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/xhr-breakpoints-sidebar-a11y-test.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { await TestRunner.loadModule('axe_core_test_runner'); await TestRunner.showPanel('sources'); diff --git a/test/webtests/http/tests/devtools/console/console-eval-uses-repl-mode.js b/test/webtests/http/tests/devtools/console/console-eval-uses-repl-mode.js index 93c7d8e484..02ec2ec99b 100644 --- a/test/webtests/http/tests/devtools/console/console-eval-uses-repl-mode.js +++ b/test/webtests/http/tests/devtools/console/console-eval-uses-repl-mode.js @@ -3,13 +3,13 @@ // found in the LICENSE file. (async function() { - TestRunner.addResult(`Tests that console inputs are evaluated in REPL mode\n`); + TestRunner.addResult('Tests that console inputs are evaluated in REPL mode\n'); await TestRunner.loadModule('console_test_runner'); await TestRunner.showPanel('console'); - TestRunner.addSniffer(TestRunner.RuntimeAgent, "invoke_evaluate", function(args) { - TestRunner.addResult("Called RuntimeAgent.invoke_evaluate"); + TestRunner.addSniffer(TestRunner.RuntimeAgent, 'invoke_evaluate', function(args) { + TestRunner.addResult('Called RuntimeAgent.invoke_evaluate'); TestRunner.addResult("Value of 'replMode': " + args.replMode); }); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-emulate-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-emulate-run.js index 36984564d3..82d73e7b19 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-emulate-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-emulate-run.js @@ -13,7 +13,7 @@ LighthouseTestRunner.getRunButton().click(); const {artifacts, lhr} = await LighthouseTestRunner.waitForResults(); - TestRunner.addResult(`\n=============== Lighthouse Results ===============`); + TestRunner.addResult('\n=============== Lighthouse Results ==============='); TestRunner.addResult(`URL: ${lhr.finalUrl}`); TestRunner.addResult(`Version: ${lhr.lighthouseVersion}`); TestRunner.addResult(`TestedAsMobileDevice: ${artifacts.TestedAsMobileDevice}`); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-export-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-export-run.js index a6b425c6ee..4f3eeb6163 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-export-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-export-run.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -(async function () { +(async function() { TestRunner.addResult('Tests that exporting works.\n'); await TestRunner.navigatePromise('resources/lighthouse-basic.html'); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js index 5b604e7e77..4a8282f955 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-flags-run.js @@ -20,7 +20,7 @@ LighthouseTestRunner.getRunButton().click(); const {artifacts, lhr} = await LighthouseTestRunner.waitForResults(); - TestRunner.addResult(`\n=============== Lighthouse Results ===============`); + TestRunner.addResult('\n=============== Lighthouse Results ==============='); TestRunner.addResult(`emulatedFormFactor: ${lhr.configSettings.emulatedFormFactor}`); TestRunner.addResult(`disableStorageReset: ${lhr.configSettings.disableStorageReset}`); TestRunner.addResult(`throttlingMethod: ${lhr.configSettings.throttlingMethod}`); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-limited-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-limited-run.js index 7cedcaa9ad..3ded6f9978 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-limited-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-limited-run.js @@ -13,17 +13,20 @@ const checkboxes = containerElement.querySelectorAll('.checkbox'); for (const checkbox of checkboxes) { if (checkbox.textElement.textContent === 'Progressive Web App' || - checkbox.textElement.textContent === 'Clear storage') + checkbox.textElement.textContent === 'Clear storage') { continue; + } - if (checkbox.checkboxElement.checked) checkbox.checkboxElement.click(); + if (checkbox.checkboxElement.checked) { + checkbox.checkboxElement.click(); + } } LighthouseTestRunner.dumpStartAuditState(); LighthouseTestRunner.getRunButton().click(); const {lhr} = await LighthouseTestRunner.waitForResults(); - TestRunner.addResult(`\n=============== Audits run ===============`); + TestRunner.addResult('\n=============== Audits run ==============='); TestRunner.addResult(Object.keys(lhr.audits).sort().join('\n')); TestRunner.completeTest(); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-prevent-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-prevent-run.js index d429741718..cd56f8f10d 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-prevent-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-prevent-run.js @@ -5,7 +5,7 @@ (async function() { // about:blank never fires a load event so just wait until we see the URL change function navigateToAboutBlankAndWait() { - var listenerPromise = new Promise(resolve => { + const listenerPromise = new Promise(resolve => { self.SDK.targetManager.addEventListener(SDK.TargetManager.Events.InspectedURLChanged, resolve); }); @@ -21,8 +21,8 @@ TestRunner.addResult('\n\n**Prevents audit with no categories**'); LighthouseTestRunner.openStartAudit(); - var containerElement = LighthouseTestRunner.getContainerElement(); - var checkboxes = containerElement.querySelectorAll('.checkbox'); + const containerElement = LighthouseTestRunner.getContainerElement(); + const checkboxes = containerElement.querySelectorAll('.checkbox'); checkboxes.forEach(checkbox => checkbox.checkboxElement.checked && checkbox.checkboxElement.click()); LighthouseTestRunner.dumpStartAuditState(); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js index 22aac4d6bd..b626e66e8b 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-successful-run.js @@ -5,7 +5,7 @@ (async function() { // screenshots in content shell are flaky and NO_NAVSTART occurs on bots way more frequently than local // ignore the results of the trace-dependent audits, just make sure they ran - var FLAKY_AUDITS = [ + const FLAKY_AUDITS = [ // metrics 'first-contentful-paint', 'first-meaningful-paint', @@ -42,12 +42,12 @@ LighthouseTestRunner.dumpStartAuditState(); - TestRunner.addResult(`\n=============== Lighthouse Status Updates ===============`); + TestRunner.addResult('\n=============== Lighthouse Status Updates ==============='); LighthouseTestRunner.addStatusListener(msg => TestRunner.addResult(msg)); LighthouseTestRunner.getRunButton().click(); - var {artifacts, lhr} = await LighthouseTestRunner.waitForResults(); - TestRunner.addResult(`\n=============== Lighthouse Results ===============`); + const {artifacts, lhr} = await LighthouseTestRunner.waitForResults(); + TestRunner.addResult('\n=============== Lighthouse Results ==============='); TestRunner.addResult(`URL: ${lhr.finalUrl}`); TestRunner.addResult(`Version: ${lhr.lighthouseVersion}`); TestRunner.addResult(`TestedAsMobileDevice: ${artifacts.TestedAsMobileDevice}`); @@ -55,7 +55,7 @@ TestRunner.addResult('\n'); Object.keys(lhr.audits).sort().forEach(auditName => { - var audit = lhr.audits[auditName]; + const audit = lhr.audits[auditName]; if (FLAKY_AUDITS.includes(auditName)) { TestRunner.addResult(`${auditName}: flaky`); diff --git a/test/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js b/test/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js index 7fa16d0eae..4b8e6a7214 100644 --- a/test/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js +++ b/test/webtests/http/tests/devtools/lighthouse/lighthouse-view-trace-run.js @@ -12,18 +12,20 @@ const containerElement = LighthouseTestRunner.getContainerElement(); const checkboxes = containerElement.querySelectorAll('.checkbox'); for (const checkbox of checkboxes) { - if (checkbox.textElement.textContent === 'Performance' || - checkbox.textElement.textContent === 'Clear storage') + if (checkbox.textElement.textContent === 'Performance' || checkbox.textElement.textContent === 'Clear storage') { continue; + } - if (checkbox.checkboxElement.checked) checkbox.checkboxElement.click(); + if (checkbox.checkboxElement.checked) { + checkbox.checkboxElement.click(); + } } LighthouseTestRunner.dumpStartAuditState(); LighthouseTestRunner.getRunButton().click(); const {lhr} = await LighthouseTestRunner.waitForResults(); - TestRunner.addResult(`\n=============== Audits run ===============`); + TestRunner.addResult('\n=============== Audits run ==============='); TestRunner.addResult(Object.keys(lhr.audits).sort().join('\n')); const waitForShowView = new Promise(resolve => { diff --git a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/a.js b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/a.js index 3bf001103b..578f5fbaf8 100644 --- a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/a.js +++ b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/a.js @@ -1,3 +1,5 @@ +/* eslint-disable */ + function foo() { return 42; } @@ -7,8 +9,8 @@ function boo() { } function main() { - var a = 1; - var b = 2; + const a = 1; + const b = 2; return a + b; } @@ -19,11 +21,6 @@ function process(a, b) { } - - - - - function another() { return 1; } diff --git a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/breakpoint.js b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/breakpoint.js index 53047ba58d..61b5269148 100644 --- a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/breakpoint.js +++ b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/breakpoint.js @@ -1,3 +1,4 @@ +/* eslint-disable */ define(['dart_sdk'], function(dart_sdk) { 'use strict'; const core = dart_sdk.core; @@ -12,23 +13,21 @@ define(['dart_sdk'], function(dart_sdk) { let StringAndListTovoid = () => (StringAndListTovoid = dart.constFn(dart.fnType(dart.void, [core.String, core.List])))(); let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.fnType(dart.void, [])))(); breakpoint._foo = function(a, b) { - let val1 = a[$codeUnits][$length]; - let val2 = a[$runes].last; - let val3 = dart.test(b[$isNotEmpty]) ? 42 : null; + const val1 = a[$codeUnits][$length]; + const val2 = a[$runes].last; + const val3 = dart.test(b[$isNotEmpty]) ? 42 : null; core.print(val3); }; dart.fn(breakpoint._foo, StringAndListTovoid()); breakpoint.main = function() { - breakpoint._foo("hello", []); + breakpoint._foo('hello', []); }; dart.fn(breakpoint.main, VoidTovoid()); - dart.trackLibraries("breakpoint", { - "breakpoint.dart": breakpoint - }, null); + dart.trackLibraries('breakpoint', {'breakpoint.dart': breakpoint}, null); // Exports: return { breakpoint: breakpoint }; }); -//# sourceMappingURL=breakpoint.js.map +// # sourceMappingURL=breakpoint.js.map diff --git a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker-with-sourcemap.js b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker-with-sourcemap.js index 64fe116eb5..bdf07beedd 100644 --- a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker-with-sourcemap.js +++ b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker-with-sourcemap.js @@ -1,7 +1,7 @@ -onmessage = function (data) { - var a = 1; - var b = 2; - return a + b; +onmessage = function(data) { + const a = 1; + const b = 2; + return a + b; }; postMessage('ready'); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyLXdpdGgtc291cmNlbWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsid29ya2VyLXdpdGgtc291cmNlbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFNBQVMsR0FBRyxVQUFBLElBQUk7SUFDZCxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDVixJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUM7QUFDZixDQUFDLENBQUM7QUFDRixXQUFXLENBQUMsT0FBTyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJvbm1lc3NhZ2UgPSBkYXRhID0+IHtcbiAgdmFyIGEgPSAxO1xuICB2YXIgYiA9IDI7XG4gIHJldHVybiBhICsgYjtcbn07XG5wb3N0TWVzc2FnZSgncmVhZHknKTsiXX0= \ No newline at end of file +// # sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyLXdpdGgtc291cmNlbWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsid29ya2VyLXdpdGgtc291cmNlbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFNBQVMsR0FBRyxVQUFBLElBQUk7SUFDZCxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDVixJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUM7QUFDZixDQUFDLENBQUM7QUFDRixXQUFXLENBQUMsT0FBTyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJvbm1lc3NhZ2UgPSBkYXRhID0+IHtcbiAgdmFyIGEgPSAxO1xuICB2YXIgYiA9IDI7XG4gIHJldHVybiBhICsgYjtcbn07XG5wb3N0TWVzc2FnZSgncmVhZHknKTsiXX0= diff --git a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker.js b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker.js index 5aedb7131c..9d724b3e37 100644 --- a/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker.js +++ b/test/webtests/http/tests/devtools/sources/debugger-breakpoints/resources/worker.js @@ -1,5 +1,5 @@ -onmessage = (data) => { - var a = 1; - var b = 2; +onmessage = data => { + const a = 1; + const b = 2; return a + b; }; diff --git a/test/webtests/http/tests/devtools/sources/snippet-eval-uses-repl-mode.js b/test/webtests/http/tests/devtools/sources/snippet-eval-uses-repl-mode.js index 67d5d0c311..737c9234ab 100644 --- a/test/webtests/http/tests/devtools/sources/snippet-eval-uses-repl-mode.js +++ b/test/webtests/http/tests/devtools/sources/snippet-eval-uses-repl-mode.js @@ -3,20 +3,20 @@ // found in the LICENSE file. (async function() { - TestRunner.addResult(`Tests that snippet scripts are evaluated in REPL mode\n`); + TestRunner.addResult('Tests that snippet scripts are evaluated in REPL mode\n'); - await TestRunner.showPanel('sources'); + await TestRunner.showPanel('sources'); - TestRunner.addSniffer(TestRunner.RuntimeAgent, "invoke_evaluate", function(args) { - TestRunner.addResult("Called RuntimeAgent.invoke_evaluate"); - TestRunner.addResult("Value of 'replMode': " + args.replMode); - }); + TestRunner.addSniffer(TestRunner.RuntimeAgent, 'invoke_evaluate', function(args) { + TestRunner.addResult('Called RuntimeAgent.invoke_evaluate'); + TestRunner.addResult('Value of \'replMode\': ' + args.replMode); + }); - const uiSourceCode = await Snippets.project.createFile('', null, ''); - await uiSourceCode.rename('Snippet1'); - uiSourceCode.setWorkingCopy('let a = 1; let a = 2;'); + const uiSourceCode = await Snippets.project.createFile('', null, ''); + await uiSourceCode.rename('Snippet1'); + uiSourceCode.setWorkingCopy('let a = 1; let a = 2;'); - await Snippets.evaluateScriptSnippet(uiSourceCode); + await Snippets.evaluateScriptSnippet(uiSourceCode); - TestRunner.completeTest(); + TestRunner.completeTest(); })(); diff --git a/test/webtests/http/tests/devtools/test_runner/assertions-show-up-in-logs.js b/test/webtests/http/tests/devtools/test_runner/assertions-show-up-in-logs.js index 2310f968ca..9d7e6afa72 100644 --- a/test/webtests/http/tests/devtools/test_runner/assertions-show-up-in-logs.js +++ b/test/webtests/http/tests/devtools/test_runner/assertions-show-up-in-logs.js @@ -3,18 +3,18 @@ // found in the LICENSE file. (async function() { - TestRunner.addResult(`Tests the test runner shows assertions in the logs\n`); + TestRunner.addResult('Tests the test runner shows assertions in the logs\n'); - TestRunner.addResult(`Passing assert should not show up`); - console.assert(true, `This is a passing assertion.`); + TestRunner.addResult('Passing assert should not show up'); + console.assert(true, 'This is a passing assertion.'); TestRunner.addResult(''); - TestRunner.addResult(`Failing assert should show up`); - console.assert(false, `This is a failing assertion.`); + TestRunner.addResult('Failing assert should show up'); + console.assert(false, 'This is a failing assertion.'); TestRunner.addResult(''); - TestRunner.addResult(`Failing assert with multiple arguments`); - console.assert(false, `This is `, `a `, `failing assertion.`); + TestRunner.addResult('Failing assert with multiple arguments'); + console.assert(false, 'This is ', 'a ', 'failing assertion.'); TestRunner.completeTest(); })();