<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 19, 2016 at 10:19 AM, Chris Hutten-Czapski <span dir="ltr"><<a href="mailto:chutten@mozilla.com" target="_blank">chutten@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Things that would help me help with this endeavour:<br><br></div>1: A bug to file patches against<br></div></div></div></div></div></div></div></div></div></div></blockquote><div><br><div style="font-family:monospace,monospace" class="gmail_default">I debated this, but given the number of tests involved that seemed like a bunch of overhead. I've been filing bugs as I fix tests.</div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div></div>2: A method for detecting if our fix actually fixes the problem<br></div></div></div></div></div></div></div></div></div></blockquote><div><br><div style="font-family:monospace,monospace" class="gmail_default">I should have included this. What I do (and it isn't perfect but hopefully not too bad, either) is to write my patch and then run |MOZ_CPOW_LOG=stacks mach mochitest <test>.js|. That will give you stacks for all CPOWs, which look like [1]:<br><br>INFO - #0 0x7f06ecc22140 i chrome://mochitests/content/browser/browser/base/content/test/urlbar/browser_bug1025195_switchToTabHavingURI_aOpenParams.js:18 (0x7f06d04dc098 @ 21)<br>INFO - #1 0x7fff49c5cab0 b resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:388 (0x7f06ecfed808 @ 254)<br>INFO - #2 0x7f06ecc220a8 i chrome://mochitests/content/browser/browser/base/content/test/urlbar/browser_bug1025195_switchToTabHavingURI_aOpenParams.js:17 (0x7f06d13f6f78 @ 252)<br>INFO - #3 0x7f06ecc22020 i self-hosted:1206 (0x7f06c747dc48 @ 24)<br><br></div><div style="font-family:monospace,monospace" class="gmail_default">Note that if the stack includes RemoteAddonsParent.jsm, then the CPOW use is almost certainly from a shim. My list explicitly filtered those out since they shouldn't intermittently go orange because the shims use CPOWs safely (they block the content process). That being said, I've been tending to convert shim uses to BrowserTestUtils anyway. One extremely common shim that I've seen used is |browser.addEventListener("load", ...)|. These shim uses can usually be trivially converted to use |BrowserTestUtils.browserLoaded(browser)|.<br></div><div style="font-family:monospace,monospace" class="gmail_default"><br></div><div style="font-family:monospace,monospace" class="gmail_default">[1] <a href="http://searchfox.org/mozilla-central/rev/d96317a351af8aa78ab9847e7feed964bbaac7d7/browser/base/content/test/urlbar/browser_bug1025195_switchToTabHavingURI_aOpenParams.js#18">http://searchfox.org/mozilla-central/rev/d96317a351af8aa78ab9847e7feed964bbaac7d7/browser/base/content/test/urlbar/browser_bug1025195_switchToTabHavingURI_aOpenParams.js#18</a></div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>I presume a skeleton of what we're looking for is:<br></div>1) Use DXR/ls -r/whatever to find the test file in the tree<br></div></div></div></div></div></div></div></blockquote><div><br><div style="font-family:monospace,monospace" class="gmail_default">Yeah, test files in my experience are unique in the tree. I use |find . name ...|.<br></div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div>2) On the line number(s) mentioned, replace the existing use of a CPOW with something better. This may involve writing things in terms of ContentTask (see documentation here[X]), or by simply finding a non-CPOW-using alternative (like using browser.webNavigation.<wbr>sessionHistory instead of browser.sessionHistory)<br></div></div></div></div></div></div></blockquote><div><br><div style="font-family:monospace,monospace" class="gmail_default">We don't have a ton of documentation. <a href="https://wiki.mozilla.org/Electrolysis/e10s_test_tips#Browser-chrome">https://wiki.mozilla.org/Electrolysis/e10s_test_tips#Browser-chrome</a> is probably the best we have.<br></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div></div>3) Run the test to make sure it still passes using ./mach test path/to/test.js<br></div><div>4) Write an informative commit message linking back to bug XXXX<br></div>5) Based on what kind of test it is, send it to try to make sure it isn't broken on other platforms<br></div><div>6) <INSERT VALIDATION OF CPOW REMOVAL STEP HERE><br></div>7) Get the patch reviewed on bug XXXX<br><br></div>Is this correct?<br></div></div></blockquote><div><br><div style="font-family:monospace,monospace" class="gmail_default">Yep.</div></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Blake<br></div></div></div></div>
</div></div>