Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)

Created:
3 years, 9 months ago by chenwilliam
Modified:
3 years, 9 months ago
Reviewers:
dgozman
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, caseq+blink_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, jam, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, einbinder+watch-test-runner_chromium.org, pfeldman, devtools-reviews_chromium.org, blink-reviews, darin-cc_chromium.org, apavlov+blink_chromium.org, jochen+watch_chromium.org, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: improve test infrastructure w/ devtools driving the test Improvements: * devtools drives the test, not the inspected page * tests are pure JS * doc-typed test harness This includes a couple sample tests to make sure this new test infra actually works, but I don't quite yet trust it, so I'm keeping the original release-note test for now :) Performance (running console-clear.js x100): TBD BUG=667560

Patch Set 1 #

Patch Set 2 : fixup #

Total comments: 7

Patch Set 3 : cl fb #

Patch Set 4 : fixup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+693 lines, -27 lines) Patch
M content/shell/browser/layout_test/blink_test_controller.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.cc View 1 2 3 3 chunks +34 lines, -10 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_devtools_frontend.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M content/shell/browser/layout_test/layout_test_devtools_frontend.cc View 1 2 3 2 chunks +27 lines, -1 line 0 comments Download
M content/shell/test_runner/test_interfaces.cc View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector-unit/filtered-list-widget-providers.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector-unit/text-prompt.js View 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear-expected.txt View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note-expected.txt View 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/simple-test.js View 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/simple-test-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/BUILD.gn View 1 2 4 chunks +10 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test/IntegrationTest.js View 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test/module.json View 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test_runner.html View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test_runner.js View 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test_runner.json View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test_runner/ConsoleTestRunner.js View 1 2 1 chunk +141 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test_runner/IntegrationTestRunner.js View 1 2 1 chunk +112 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/integration_test_runner/module.json View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/main/Main.js View 1 2 5 chunks +10 lines, -6 lines 0 comments Download
A third_party/WebKit/Source/devtools/front_end/main/Timer.js View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/main/module.json View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/shell/TestShell.js View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js View 5 chunks +78 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/test_runner/module.json View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/scripts/compile_frontend.py View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (5 generated)
chenwilliam
ptal. I know it looks like a big patch, but a lot of it is ...
3 years, 9 months ago (2017-03-09 01:27:42 UTC) #4
dgozman
3 years, 9 months ago (2017-03-10 00:17:17 UTC) #5
Exciting!

https://codereview.chromium.org/2742623002/diff/20001/content/shell/browser/l...
File content/shell/browser/layout_test/blink_test_controller.cc (right):

https://codereview.chromium.org/2742623002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/blink_test_controller.cc:232:
inspected_window_(NULL),
nullptr

https://codereview.chromium.org/2742623002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/blink_test_controller.cc:296:
inspected_window_->LoadURL(GURL(url::kAboutBlankURL));
Did we detach at the end of previous test? It would be unfortunate to navigate
while attached and waste resources.

https://codereview.chromium.org/2742623002/diff/20001/content/shell/browser/l...
File content/shell/browser/layout_test/blink_test_controller.h (right):

https://codereview.chromium.org/2742623002/diff/20001/content/shell/browser/l...
content/shell/browser/layout_test/blink_test_controller.h:270: Shell*
inspected_window_;
Where do we clean this up? Or does it stay forever?

https://codereview.chromium.org/2742623002/diff/20001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js
(right):

https://codereview.chromium.org/2742623002/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js:1:
TestRunner.addResult("Test release note\n");
Copyright!

https://codereview.chromium.org/2742623002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
(right):

https://codereview.chromium.org/2742623002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js:95:
TestRunner.addSniffer = function(receiver, methodName, override, opt_sticky) {
General question: should we use this opportunity to make better test helpers, or
we'll be able to migrate many existing tests automatically at once?

https://codereview.chromium.org/2742623002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/devtools/front_end/timer/Timer.js (right):

https://codereview.chromium.org/2742623002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/timer/Timer.js:4: Timer.time =
function(label) {
Just add a helper in Main.js for now?

Powered by Google App Engine
This is Rietveld 408576698