March 2015

I'm continuing the narrative form experiment from last month, but decided to rename the feed from status updates to development diary to better reflect what can be found here.

Again I have to reiterate that this is merely a collection of notes and thoughts on my professional work. It also serves as a work log so I can more easily backtrack my own thoughts. The notes herein do not contain any personal thoughts or reflections of any kind.

2015-03-02

Internet connection in London office is down. Since my code is on a machine in the office I access over VPN, I'm unable to continue with the rebasing of bug 1107706. Trying to find other work to do so that I'm not blocked.

Fixed up issues with PR 4 for WebDriver. Removed some more references to Presto-Opera in Selenium. Fixed JavaDocs generation errors in Selenium.

Provided feedback on PR 322 in Selenium and PR 4 in WebDriver.

2015-03-08

Responded to bug 1094246 about atoms in Marionette.

2015-03-09

Reviewed PR 328 in Selenium.

Filed bug 1141050 about importing the marionette.keys.Keys class into the marionette namespace for the Python client. Marked as good first bug; it's a one-line change.

Continued work on bug 1107706 and discovered there are some cases of out-of-sync messages from executeScript in content context. I'm not sure yet if they only happen after a modal dialogue related command has been processed, or if it's an inherent problem with the implementation in the listener. In any case it's odd that it should surface now.

On closer investigation it turned out that checkLoad isn't being removed because the onbeforeunload event handler triggers a dialogue to appear. This probably worked previously because there was no ListenerProxy that kept track of the curCmdId. Responses from listeners were just propagated straight on.

2015-03-10

Continued work on making modal dialogues work for bug 1107706. By properly removing the dialogue handling callbacks, I was able to get all the tests passing.

Spent some more time cleaning up the code which presented me with some challenges with regards to code delegation and organisation. In the evening I pushed a try run. And another. Unfortunately (?) the test results show that a couple of new tests are failing.

2015-03-11

There were two issues form yesterdays try runs. Since bug 1107706 branched off the session ID key had been changed from session_id to sessionId and my patch was only catering for one when it should've catered for both (for backwards-compatibility reasons). The second was a missing yield statement in front of the call to executeWithCallback which was caused by a new test that had been added. This caused executeJSScript tests (simpletests) to fail. Triggered a new try run.

Rebased the patch series on top of m-c, but this was complicated by the marionette-server.js to driver.js rename. Tasks for tomorrow is to go through changes to the former since 25 February (original branch date). Noted down names of failing tests which must then be looked at.

Reviewed r/4236, r/4235, r/4234, and r/4127.

2015-03-12

Reviewed r/4244, r/4245, r/4243, r/4246 and provided feedback on bug 1141418.

Backported fix for getting the CSS styling of chrome elements for the patches included in bug 1107706, which fixed the test_we_can_get_css_value_on_chrome_element test.

Worked on backporting chmanchester's remoteness change patch, but it appears we need to deal with the register message from listener at a global level, which makes sense when you think about it. It appears that his and my patch have made a series of pretty identical changes to Marionette.

Luke and Simon migrated the canonical Selenium repository to Github, and I did my share of the work in the evening by updating various links.

2015-03-13

Applied chmanchester's remoteness change rebase diff, and it worked perfectly. I still have one failing test, test_open_in_new_window_shortcut from test_key_actions.py failing, but this might be an issue with the X forwarding I do. Started a new try run.

2015-03-14

Since Selenium recently migrated its canonical repository from Google Code to Github, I spent some time cleaning up old links and references to GC. Also rewrote the CONTRIBUTING file, inspired by io.js' equivalent but adapted to our policies.

Submitted PR 5221 to Servo that ensures that Web Platform Tests are bootstrapped (git submodules have been recursively cloned).

2015-03-16

The test failures from the latest try run for bug 1107706 were caused by this.commandId being reset in Dispatcher for every response, where as it should only be reset to null for responses to the client. This is because emulator callbacks are meant to be transparent. Pushed a new try run.

Wrote the Browser Tools- and Testing WG to highlight a change of decision to rely on CSS Backgrounds Level 4 to say why html and body are visible, instead of using our own special snowflake definition.

Provided needinfo response for bug 1088192.

Finally published review for bug 1107706, r/5441.

Filed bugs bug 1143908, bug 1143872.

2015-03-17

Fixed up many code review issues in r/5441 for bug 1107706.

Rebased the PR that rewrites the element visibilitydisplayedness algorithm for the WebDriver specification.

Reviewed bug 1144240.

2015-03-18

Continued fixing review issues for r/5441.

Filed bug bug 1144653.

2015-03-19

Continued fixing review issues for r/5441. Triggered a new try run.

Worthy of mentioning, I managed to fix a race condition that happened when a modal dialogue appeared whilst making a call to the listener. I also redesigned the modal dialogues API from scratch, and made it a module that now lives in modal.js.

2015-03-20

As part of the modal dialogue API redesign yesterday, I introduced a TypeError thrown when trying to use the API on a non-Firefox product. This was a bad idea that caused Gip tests to fail, and will be changed to simply return in that eventuality.

Commented on bug 1078237 because it was highlighted in my try run as well. At closer inspection it looks like the handleDialog observer and the message listeners aren't being removed properly when the ListenerProxy promise is resolved.

Fixed up another batch of nitpicks on r/5441 and pushed a new try run.

Closed bug 974403 as WFM since it has not been seen for a while.

Ran into yet another issue with the latest try run, with regards to restarting Firefox via quitApplication. I added a stop signal shortcut from Dispatcher to MarionetteServer to stop the TCP server, and triggered yet another try run.

2015-03-21

Spent some time figuring out bors and setting it up for Selenium. Specifically I had to write Jenkins plugin for it, which seems to work. Some more work is needed to make it a viable option for Selenium.

2015-03-23

Did a few more fixes for r/5441, including fixing emulator callbacks and style fixes. Bug 1107706 is now more or less complete. Awaiting r+ from dburns and chmanchester.

Filed bug 1146547 about a race condition I discovered when debugging an issue with jgraham.

Attended the A-team fortnightly meeting.

In the late evening I was finally able to land bug 1107706 on inbound. However it was backed out after it was discovered that I hadn't rebased chmanchester's change to expose action chains in chrome space properly.

I also ran into problems with Mercurials parsing of a revset alias. gps submitted a patch for this.

2015-03-24

Worked on rebasing chmanchester's changes on top of bug 1107706.

Filed issue 365 on Selenium.

Started work on file uploads, which is bug 941085.

2015-03-25

Triggered a try run with -b do -p all -u all -t none syntax to gather more data on why the patches for bug 1107706 are triggered Mochitest failures. Struggeling to understand how it relates with Marionette.

Concluded that many of the failures in the try run came from other commits on inbound that bled over into mine. Specifically I investigated the permafail in the C1 job on B2G emulators, and it turns out this test was recently disabled on Windows for being “crazy”. The media personell didn't object to the idea of also disabling it on B2G if it proved to have issues there as well.

So far the only real issue seems to be related to Gaia Javascript integration tests (Gij) on B2G Desktop Linux with the apps/system/test/marionette/net_error_test.js test. I first though it was a permafail also, but it appears to pass around 50% of the time. The other half of the times it crashes. The code creates an iframe and sets it's src attribute to http://fail.fail.fail which gives you an about:neterror page. It then run a series of assertions on this page after it catches the error that Marionette throws on hitting such sites. I haven't been able to tell what causes this yet.

Decided to trigger a new try run that has my patches appliedgrafted on top of central, and which also contains Mac OS X 10.10, which isn't included by default in the try syntax for some reason.

I later learned that OS X 10.10 isn't run for integrations on inbound. I incorrectly made this assumption because I saw it, and 10.8, appear on my previous try run. Because we make universal builds on Mac, the builds can happen at any one of these target configurations, but there are no explicit build checks or testing requirements on any of them except 10.6. This means I had to retrigger my try run, so that I can get sane results, with the -b do -p all -u all -t none syntax.

Had 1:1 with dburns.

2015-03-26

Filed bug 28344 agains the WebDriver spec.

Because the (all of) the trees are closed today, I got some time to work on bug 941085. I initially struggled with setting multiple file values to <input type=file multiple> through its value setter. jdm told me there's a chrome-only interface called mozSetFileArray that takes a sequence of File objects that I could use. Because the element is being located in content space, I pass it back to chrome via a CPOW. To begin with I thought the interface methods marked [ChromeOnly] wouldn't appear since the object had been initialised in content and that I'd need to somehow augment it to expose those interfaces, but this seems to magically work. This makes me happy.

The patch for file uploads in Marionette, as they are described in the WebDriver spec (where a second sendKeys call appends) is finished, but it requires a test for not appending to non-multiple fields, as well as a few more tests. Specifically dburns wants a test that uploads to a local httpd, which should be possible to do through the mozhttpd that we use for serving the test suite.

2015-03-27

Travel day, as I'm heading to Norway to attend a boating course over the weekend.

I should expand on yesterdays progress on that it was based off of bug 1107706 which still hasn't landed on central. This is due to the fact that the trees have now, practically, been closed for three consecutive days. My observation is that this is because of the new end of quarter deliverables scheme, where everyone now wants to hurry up and land their code before the deadline.

This is like being back at school, where you have to make sure you get your work in before a set time so you'll get a good grade. My experience so far is that real life doesn't quite work that way. It doesn't matter if a patch lands a day before, on the day, or a day or even a few later.

2015-03-31

Filed bug 28382 for sending back an invalid argument error when setting a non-existant file to <input type=file>.

Continued work on bug 941085, and submitted r/6357 and a try run.

Reviewed bug 1149347 which removes extranous special powers initialisation. Special powers are initialised conditionally in driver.js.

Submitted my about:credits application (-:

Submitted patches for bugs 1149625 and 1149619.