ibling).getPropertyValue('color'), 'rgb(255, 0, 0)');
        assert_equals(getComputedStyle(mySibling2).getPropertyValue('color'), 'rgb(0, 0, 255)');
    }, "state selector has influence on nth-of when state is applied");

    test(function(t) {
        t.add_cleanup(() => { myCE.elementInternals.states.delete('--foo') });
        t.add_cleanup(() => { myCE2.elementInternals.states.delete('--foo') });
        myCE.elementInternals.states.add('--foo');
        myCE2.elementInternals.states.add('--foo');
   