set .tabIndex should return 0 by default");

for (const setValue of [-1, 0, 1]) {
  promise_test(async t => {
    const frame = await getFrame(t);
    frame.setAttribute("tabindex", setValue);
    assert_equals(frame.tabIndex, setValue);
  }, `connected frame element inside frameset .tabIndex should return ${setValue} when set to ${setValue}`);
}


function getFrame(t) {
  return new Promise((resolve, reject) => {
    const iframe = document.createElement("iframe");
    t.add_cleanup(() => iframe.remove());