https://github.com/web-platform-tests/wpt
Revision 8ec345bcd24282ce94960fc0b11ca057bec393be authored by Ian Kilpatrick on 27 March 2018, 05:07:50 UTC, committed by Blink WPT Bot on 27 March 2018, 05:15:10 UTC
This implements the LayoutFragment.inlineOffset and
LayoutFragment.blockOffset attributes.

The tests added simply re-create the reference by setting these two
attributes in different text directions and writing modes.

Change-Id: I1865403ca12e3b174738ee93320eae5ba16ac292
Bug: 726125
Reviewed-on: https://chromium-review.googlesource.com/971832
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546018}
1 parent c32afde
Raw File
Tip revision: 8ec345bcd24282ce94960fc0b11ca057bec393be authored by Ian Kilpatrick on 27 March 2018, 05:07:50 UTC
[css-layout-api] Allow developers to position fragments.
Tip revision: 8ec345b
basetest.html
<!DOCTYPE html>
<head>
<title>Performance Paint Timing Test</title>
</head>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="main"></div>

<script>
async_test(function(t) {
    t.step(function() {
        const bufferedEntries = performance.getEntriesByType('paint');
        assert_equals(bufferedEntries.length, 0, "No paint entries yet");
    });
    const div = document.createElement("div");
    div.style.width = "100px";
    div.style.height = "100px";
    div.style.backgroundColor = "red";
    div.style.color = "blue";
    div.innerHTML = "test"
    document.getElementById("main").appendChild(div);
    function testPaintEntries() {
        const bufferedEntries = performance.getEntriesByType('paint');
        if (bufferedEntries.length < 2) {
            t.step_timeout(function() {
                testPaintEntries();
            }, 20);
            return;
        }
        t.step(function() {
            assert_equals(bufferedEntries.length, 2, "FP and FCP.");
            assert_equals(bufferedEntries[0].entryType, "paint");
            assert_equals(bufferedEntries[0].name, "first-paint");
            assert_equals(bufferedEntries[1].entryType, "paint");
            assert_equals(bufferedEntries[1].name, "first-contentful-paint");
            t.done();
        });
    }
    t.step(function() {
        testPaintEntries();
    });
}, "Basic test to check existence of FP and FCP.");
</script>
</body>
</html>
back to top