1 2--- 3title: "Blink layout tests" 4linkTitle: "Blink layout tests" 5 6--- 7 8 9How to land Skia changes that change Blink layout test results. 10 11Changes that affect a small number of layout test results 12--------------------------------------------------------- 13Changes affecting fewer than ~20 layout tests can be rebaselined without 14special coordination with the Blink gardener using these steps: 15 161. Prepare your Skia change, taking note of which layout tests will turn red 17 \(see http://www.chromium.org/developers/testing/webkit-layout-tests for more 18 detail on running the Blink layout tests\). 192. Check in your code to the Skia repo. 203. Ahead of the Skia auto roll including your change, manually push a change to the 21 Blink LayoutTests/TestExpectations [file](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/web_tests/TestExpectations), flagging tests expected to fail as a result of your change as follows: 22 foo/bar/test-name.html [ Failure Pass ] # Needs rebaseline 23 244. Wait for the Skia roll to land successfully. 255. Check in another change to the Blink TestExpectations file removing all the 26 skipped test expectations you add earlier, an run `git cl rebaseline` which will prompt the automatic rebaseline. 27 28 29 30Changes that affect a large number of test results 31-------------------------------------------------- 32Where a 'large number' or 'many' means more than about 20. 33Follow the instructions below: 34 35In the following the term 'code suppression' means a build flag \(a\.k\.a\. define\). 36Such code suppressions should be given a name with the form SK\_IGNORE\_xxx\_FIX. 37 38Updating the version of Skia in Chromium is called a 'roll'. 39The Auto Roll Bot performs this roll multiple times per day, and can also be done manually. 40See https://chromium.googlesource.com/chromium/src/+log/main/DEPS and search for skia\-deps\-roller. 41 42### Setup 43#### Code suppression does not yet exist \- Direct method 441. Make a change in Skia which will change many Blink layout tests. 452. Put the change behind a code suppression. 463. Check in the change to the Skia repository. 474. Manually roll Skia or append the autoroll with the code suppression to 48 Chromium's 'skia/chromium\_skia\_defines\.gypi' 49 50#### Code suppression does not yet exist \- Alternate method 511. Add code suppression to Chromium's 'skia/chromium\_skia\_defines\.gypi' before making code 52 changes in Skia. 532. Make a change in Skia which will change many Blink layout tests. 543. Put the change behind a code suppression. 554. Check in the change to the Skia repository. 565. Wait for Skia roll into Chromium. 57 58#### Code suppression exists in header 591. Remove code suppression from header file in Chromium and add code suppression to 60 Chromium's 'skia/chromium\_skia\_defines\.gypi'. 61 The code suppression cannot be in a header file and a defined in a gyp file at the 62 same time or a multiple definition warning will be treated as an error and break 63 the Chromium build. 64 65### Rebaseline 661. Choose a time when the Blink tree is likely to be quiet. Avoid PST afternoons in 67 particular. The bigger the change, the more important this is. Regardless, 68 determine who the Blink gardener is and notify them. You will be making the 69 Chromium\.WebKit tree very red for an extended period, and the gardener needs to 70 know that they are not expected to fix it. 712. Create a CL removing the code suppression from Chromium's 72 skia/chromium\_skia\_defines\.gypi while simultaneously adding [ NeedsRebaseline ] 73 lines to Blink's LayoutTests/TestExpectations [file](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/web_tests/TestExpectations). 74 Then the auto rebaseline bot will take care of the work of actually checking in the 75 new images. This is generally acceptable for up to 600 or so rebaselined images. 76 Above that you might still use [ NeedsRebaseline ], but it's best to coordinate with 77 the gardener. This should go through the CQ cleanly. 783. Be careful with tests that are already failing or flakey. These may or may not need 79 to be rebaselined and flakey tests should not be removed from TestExpectations 80 regardless. In such cases revert the TestExpectations changes before committing. 814. If you are not the one handling the cleanup step, please open a Skia Issue of the 82 form 83 Title: "Remove code suppression SK\_IGNORE\_xxx\_FIX\." 84 Comment: "Code suppression SK\_IGNORE\_xxx\_FIX rebaselined with Blink revision 85 123456\." and assign it to the individual responsible for the cleanup step. 86 87### Cleanup 881. Remove the now unused old code from Skia and any defines which were introduced 89 to suppress the new code. 902. Check in the cleanup change to the Skia repository. 913. Wait for Skia roll into Chromium. 92 93 94