Finding browser bugs, the easy way

about:emilio

Quick WPT introduction

  • Shared test suite across all major browser engines.
  • Different test kinds:
    • testharness tests.
    • reftests
    • webdriver tests
    • visual / manual tests

Most new tests in Gecko go to WPT

  • There’s spec ambiguity.
  • They test some browser-specific/non-content-observable functionality.
  • Crashtests.

But…

  • Sometimes you can do better than a crashtest.

  • But sometimes there’s actually no clear “correct” output.
  • Or the correct behavior is already covered.
  • Thus WPT gets no coverage for very tricky edge cases 😞

Can we have crashtests?

Let’s get some data!

  • Local debug builds of Firefox, Chromium, WebKit.
  • Extremely crappy test manifest parser / test runner.
  • Berlin is cold 😃.

Chromium

  • Six different bugs found by running Gecko’s crashtest suite.
  • 1009830, 1009827, 1009825, 1009821, 1009817, 1009806.
  • DOM, SVG, layout, media, paint and canvas.
  • Mostly but not only debug assertion failures.
  • Surprisingly no editing crashes.

Gecko

  • Two bugs found by running Chromium’s crashtests: 1585226, 1585303.
  • One leak caught by a debug assertion (which I fixed myself), one editing bug.

WebKit

In a nutshell

Run / From Gecko WebKitGTK+ Chromium
Gecko N/A TODO 2/0/0
WebKitGTK+ 7/0/1 N/A 16/3/1
Chromium 6/0/1 TODO N/A

Follow-up work

  • Run WebKit tests on Gecko and Chromium.
  • Run the tests with ASAN enabled (🍿).
  • Improve the heuristic to determine whether a Chromium or WebKit test-case is a crashtest.

Conclusions

  • I think crashtests would be useful in WPT.
  • Browsers are hard.
  • Editing is pretty broken.