var host = d.createElement('div');
d.body.appendChild(host);
- var s = createSR(host);
+ var s = host.createShadowRoot();
var inp1 = d.createElement('input');
inp1.setAttribute('type', 'text');
chb2.setAttribute('class', 'shadow');
chb2.setAttribute('tabindex', '3');
chb2.addEventListener('focus', A_07_02_03_T02.step_func(function(event) {
- assert_equals(counter++, 3, 'Point 2: wrong focus navigation order');
+ assert_equals(counter++, 2, 'Point 2: wrong focus navigation order');
invoked[2] = true;
}), false);
invoked[2] = false;
var chb3 = d.createElement('input');
chb3.setAttribute('type', 'checkbox');
- chb3.setAttribute('id', 'chb2');
+ chb3.setAttribute('id', 'chb3');
chb3.setAttribute('class', 'shadow');
chb3.setAttribute('tabindex', '2');
chb3.addEventListener('focus', A_07_02_03_T02.step_func(function(event) {
- assert_equals(counter++, 2, 'Point 3: wrong focus navigation order');
+ assert_equals(counter++, 1, 'Point 3: wrong focus navigation order');
invoked[3] = true;
}), false);
invoked[3] = false;
host.appendChild(chb3);
- var s = createSR(host);
+ var s = host.createShadowRoot();
var div = d.createElement('div');
div.innerHTML = '<content select=".shadow"></content>';
var chb4 = d.createElement('input');
chb4.setAttribute('type', 'checkbox');
- chb4.setAttribute('id', 'chb2');
+ chb4.setAttribute('id', 'chb4');
chb4.setAttribute('tabindex', '6');
chb4.addEventListener('focus', A_07_02_03_T02.step_func(function(event) {
- assert_equals(counter++, 1, 'Point 6: wrong focus navigation order');
+ assert_equals(counter++, 3, 'Point 6: wrong focus navigation order');
invoked[6] = true;
}), false);
invoked[6] = false;
chb1.focus();
//simulate TAB clicks
- //Expected order: chb1, chb4, chb3, chb2, inp1, inp2
+ //Expected order: chb1, chb3, chb2, chb4, inp1, inp2
fireKeyboardEvent(d, chb1, 'U+0009');
- fireKeyboardEvent(d, chb4, 'U+0009');
fireKeyboardEvent(d, chb3, 'U+0009');
fireKeyboardEvent(d, chb2, 'U+0009');
+ fireKeyboardEvent(d, chb4, 'U+0009');
fireKeyboardEvent(d, inp1, 'U+0009');
fireKeyboardEvent(d, inp2, 'U+0009');