1Blink layout tests 2================== 3 4How to land Skia changes that change Blink layout test results. 5 6Changes that affect a small number of layout test results 7--------------------------------------------------------- 8Changes affecting fewer than ~20 layout tests can be rebaselined without 9special coordination with the Blink gardener using these steps: 10 111. Prepare your Skia change, taking note of which layout tests will turn red 12 \(see http://www.chromium.org/developers/testing/webkit-layout-tests for more 13 detail on running the Blink layout tests\). 142. Check in your code to the Skia repo. 153. Ahead of the Skia auto roll including your change, manually push a change to the 16 Blink LayoutTests/TestExpectations [file](http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations), 17 flagging tests expected to fail as a result of your change with \[ NeedsManualRebaseline \]. 184. Wait for the Skia roll to land successfully. 195. Check in another change to the Blink TestExpectations file changing the flags to 20 \[ NeedsRebaseline\], which will prompt the automatic rebaseline. 21 22 23 24Changes that affect a large number of test results 25-------------------------------------------------- 26Where a 'large number' or 'many' means more than about 20. 27Follow the instructions below: 28 29In the following the term 'code suppression' means a build flag \(a\.k\.a\. define\). 30Such code suppressions should be given a name with the form SK\_IGNORE\_xxx\_FIX. 31 32There are dependency revisions which must be updated in this process. Updating 33a dependency revision is called a 'roll'. There are two different rolls which 34concern this process, each of which happens via an Auto Roll Bot multiple 35times per day, and can also be done manually: 36 37 * Skia roll into Chromium. See 38https://chromium.googlesource.com/chromium/src/+log/master/DEPS and search for 39skia\-deps\-roller. 40 * Blink roll into Chromium. See 41https://chromium.googlesource.com/chromium/src/+log/master/DEPS and search for 42blink\-deps\-roller. 43 44### Setup 45#### Code suppression does not yet exist \- Direct method 461. Make a change in Skia which will change many Blink layout tests. 472. Put the change behind a code suppression. 483. Check in the change to the Skia repository. 494. Manually roll Skia or append the autoroll with the code suppression to 50 Chromium's 'skia/skia\_common\.gypi' 515. Add code suppression to Blink's 'public/blink\_skia\_config\.gyp'. 526. Wait for Blink roll into Chromium. 537. Remove code suppression from Chromium's 'skia/skia\_common\.gypi'. 54 55#### Code suppression does not yet exist \- Alternate method 561. Add code suppression to Blink's 'public/blink\_skia\_config\.gyp' before making code 57 changes in Skia. 582. Make a change in Skia which will change many Blink layout tests. 593. Put the change behind a code suppression. 604. Wait for Blink roll into Chromium. 615. Check in the change to the Skia repository. 626. Wait for Skia roll into Chromium. 63 64#### Code suppression exists in header 651. Remove code suppression from header file in Chromium and add code suppression to 66 Chromium's 'skia/skia\_common\.gypi'. 67 The code suppression cannot be in a header file and a defined in a gyp file at the 68 same time or a multiple definition warning will be treated as an error and break 69 the Chromium build. 702. Add code suppression to Blink's 'public/blink\_skia\_config\.gyp'. 713. Wait for Blink roll into Chromium. 724. Remove code suppression from Chromium's 'skia/skia\_common\.gypi'. 73 74### Rebaseline 751. Choose a time when the Blink tree is likely to be quiet. Avoid PST afternoons in 76 particular. The bigger the change, the more important this is. Regardless, 77 determine who the Blink gardener is and notify them. You will be making the 78 Chromium\.WebKit tree very red for an extended period, and the gardener needs to 79 know that they are not expected to fix it. 802. Create a CL removing the code suppression from Blink's 81 public/blink_skia_config.gyp while simultaneously adding [ NeedsRebaseline ] 82 lines to Blink's LayoutTests/TestExpectations [file](http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations). 83 Then the auto rebaseline bot will take care of the work of actually checking in the 84 new images. This is generally acceptable for up to 600 or so rebaselined images. 85 Above that you might still use [ NeedsRebaseline ], but it's best to coordinate with 86 the gardener/sheriff. This should go through the CQ cleanly. 873. Be careful with tests that are already failing or flakey. These may or may not need 88 to be rebaselined and flakey tests should not be removed from TestExpectations 89 regardless. In such cases revert the TestExpectations changes before committing. 904. If you are not the one handling the cleanup step, please open a Skia Issue of the 91 form 92 Title: "Remove code suppression SK\_IGNORE\_xxx\_FIX\." 93 Comment: "Code suppression SK\_IGNORE\_xxx\_FIX rebaselined with Blink revision 94 123456\." and assign it to the individual responsible for the cleanup step. 95 96### Cleanup 971. Wait for Blink roll into Chromium, so that Chromium is using the new Skia code 98 and new Blink baselines. 992. Remove the now unused old code from Skia and any defines which were introduced 100 to suppress the new code. 1013. Check in the cleanup change to the Skia repository. 1024. Wait for Skia roll into Chromium. 103 104