Switch some calls to addOneTimeListener from callback-style to Promise.
MozReview-Commit-ID: F9AlSvK0MAH
--HG--
extra : rebase_source : 076522e89004f8a4634b4f7732800a5ec14ce633
Once the test was migrated, it was failing because we did not show
error messages for invalid cd() calls.
There was a missing part in the evaluation result prepare message, which
this patch fixes. A stub and a mocha test were added to make sure we do
display those kind of messages.
MozReview-Commit-ID: FcTsP2pr3vD
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-609872-cd-iframe-child.html => devtools/client/webconsole/new-console-output/test/mochitest/test-cd-iframe-child.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-609872-cd-iframe-parent.html => devtools/client/webconsole/new-console-output/test/mochitest/test-cd-iframe-parent.html
extra : rebase_source : 8fc82b71875cebfed0e318d1eba8b5332dc650c7
@Honza: Please wait for a green try before reviewing this.
MozReview-Commit-ID: 5KlOkYLnorj
--HG--
extra : rebase_source : 339c2dda1eb2afaf490e6bacb613addeece42d04
ESLint 4 will turn on all rules after an eslint-enable with no arguments. Therefore be more specific about which rules are being disabled.
MozReview-Commit-ID: IoPBG72zySm
--HG--
extra : rebase_source : f0095f7a9bc3020c1a36387cd033d1b1238a61cf
@nchevobbe: Please wait for a green try before reviewing this.
MozReview-Commit-ID: 9SLEHAq0IQQ
--HG--
extra : rebase_source : f3864d13d36802914171581f9f60351cf71aad2f
As you add more than 7 or so custom devices, the modal will eventually wrap to
a 4th column. Adding some more width allows that to happen without a horizontal
scroll bar.
This width looks natural without custom devices as well, and its not too large
for the most popular screen size (1366 x 768).
MozReview-Commit-ID: 5IErG8NX3xO
--HG--
extra : rebase_source : cbdb862597ef1774964bea135da6376e0cbb7650
@nchevobbe: Please wait for a green try before reviewing this.
MozReview-Commit-ID: 9SLEHAq0IQQ
--HG--
extra : rebase_source : b916d948f3712bf4f09e50436cbdd0cf0f12afb4
Response content should only be fetched whenever it is strictly needed
as it is the response body. A possibly very large string.
So, netmonitor UI should only retrieve it when users select the Response Panel
or do any other action that require having access to it (like "Copy response"
context menu).
MozReview-Commit-ID: CtpJ8PKsCsm
--HG--
extra : rebase_source : 4540f641e511b2199436ad5c2edccda8aff37634
Adding an HTML preview above the raw payload viewer on the developer
tools response tab caused browser_net_cyrillic-02.js to fail since
CodeMirror only renders visible lines to the DOM. The new HTML preview
shares space with the CodeMirror editor, so the resulting height became
shorter; enough to hide the line this test was looking for.
This solution uses CodeMirror.getValue() to retrieve the contents of all
lines stored in memory. Checking against that will allow the test to
pass since it contains the cyrillic text. One downside is that this
makes the test less reliable since it may not be guaranteed that what
CodeMirror has buffered to render will actually be what's inserted into
the DOM.
Two other solutions were explored before settling on the one above. The
first was simulating scroll events through EventUtils.sendWheelAndPaint.
const event = {
deltaMode: WheelEvent.DOM_DELTA_LINE,
deltaY: 20
}
yield new Promise(resolve => {
EventUtils.sendWheelAndPaint(
document.querySelector(".CodeMirror-scroll"),
10,
10,
event,
resolve,
monitor.panelWin
);
})
This did scroll the editor enough to render content and pass the test,
but caused additional errors since monitor.panelWin did not have a
.waitForAllPaintsFlushed() method that EventUtils.sendWheelAndPaint
expected.
The below alternative uses a hard-coded scroll amount and a
requestAnimationFrame as a rough estimate of when scrolling finished.
It worked in the ten or so runs I tested, but there's nothing guaranteed
about requestAnimationFrame that indicates when CodeMirror's rendering
has finished.
document.querySelector(".CodeMirror-scroll").scrollBy(0, 200);
yield new Promise(resolve => requestAnimationFrame(resolve));
MozReview-Commit-ID: H95HjR8UNpx
--HG--
extra : rebase_source : 03e4cd1e3a9042fa565373487c5cbb1118530917