https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.htmlFile third_party/WebKit/LayoutTests/inspector/console/console-focus.html
(right):
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode22third_party/WebKit/LayoutTests/inspector/console/console-focus.html:22:
if (prompt._editor)
We should not have races in the tests, is there a reason to warrant that
the editor is there?
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode28third_party/WebKit/LayoutTests/inspector/console/console-focus.html:28:
InspectorTest.waitForConsoleMessages(22, beginTests);
() => InspectorTest.runTestSuite(testSuite)
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode35third_party/WebKit/LayoutTests/inspector/console/console-focus.html:35:
focusedElement.blur();
Where does this put the focus though? It might be better to focus
another element explicitly.
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode45third_party/WebKit/LayoutTests/inspector/console/console-focus.html:45:
viewport.invalidate();
Changes to viewport API will now require updating this change, at the
same time the behavior you test has nothing to do with the viewport.
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode46third_party/WebKit/LayoutTests/inspector/console/console-focus.html:46:
viewport.forceScrollItemToBeFirst(0);
ditto
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode49third_party/WebKit/LayoutTests/inspector/console/console-focus.html:49:
InspectorTest.addResult(String.sprintf("Test cannot be run as viewport
is not tall enough. It is required to contain at least %d messages, but
%d only fit", minimumViewportMessagesCount, viewportMessagesCount));
You can't have test giving up, it either works or does not, it can't say
"i can't run".
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode61third_party/WebKit/LayoutTests/inspector/console/console-focus.html:61:
dumpFocusInfo();
We should only dump the scrollTop, that's what we are testing. And we
should make sure it does not change, so we need to compare it to the
value _before_.
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode69third_party/WebKit/LayoutTests/inspector/console/console-focus.html:69:
InspectorTest.addSniffer(ObjectUI.ObjectPropertyTreeElement,
"populateWithProperties", onExpanded);
Once again, we are not testing ObjectPropertySection here, so just one
test should suffice.
https://codereview.chromium.org/2840663002/diff/100001/third_party/WebKit/LayoutTests/inspector/console/console-focus.html#newcode102third_party/WebKit/LayoutTests/inspector/console/console-focus.html:102:
InspectorTest.evaluateInConsole("'history entry 1'", onMessageAdded);
Not sure what these are testing...
https://codereview.chromium.org/2840663002/