Commit 90f0f969 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Convert some more layout tests with W3C testharness

These tests are either flaky or have non-trivial dependency on the text
dump produced by js-test.js, and hence, blocking the text dump rebaseline
in crrev.com/c/1247196.

So this CL converts them first with testharness to ease the rebaseline.

Bug: 887148
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ic0a29e830fa5401e8636b9903a90b2e2fb9821eb
Reviewed-on: https://chromium-review.googlesource.com/1249801
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595361}
parent 7c7d0354
This tests that navigating in a multiselect list updates selection and the active selected option and sends a notification.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
PASS accessibleOne.isSelected is true
PASS accessibleOne.isSelectedOptionActive is true
PASS accessibleTwo.isSelected is false
PASS accessibleTwo.isSelectedOptionActive is false
PASS accessibleThree.isSelected is false
PASS accessibleThree.isSelectedOptionActive is false
PASS accessibleOne.isSelected is false
PASS accessibleOne.isSelectedOptionActive is false
PASS accessibleTwo.isSelected is true
PASS accessibleTwo.isSelectedOptionActive is true
PASS accessibleThree.isSelected is false
PASS accessibleThree.isSelectedOptionActive is false
PASS accessibleOne.isSelected is false
PASS accessibleOne.isSelectedOptionActive is false
PASS accessibleTwo.isSelected is true
PASS accessibleTwo.isSelectedOptionActive is false
PASS accessibleThree.isSelected is true
PASS accessibleThree.isSelectedOptionActive is true
List notification: ActiveDescendantChanged
List notification: SelectedChildrenChanged
List notification: SelectedChildrenChanged
List notification: ActiveDescendantChanged
List notification: SelectedChildrenChanged
List notification: ActiveDescendantChanged
TEST COMPLETE
<html>
<head>
<script src="../resources/js-test.js"></script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
const testCase = async_test(
'Navigating in a multiselect list updates selection and the active selected option and sends a notification');
const expectedNotifications = [
'ActiveDescendantChanged',
'SelectedChildrenChanged',
'SelectedChildrenChanged',
'ActiveDescendantChanged',
'SelectedChildrenChanged',
'ActiveDescendantChanged',
];
let notificationReceivedIndex = 0;
function runTest() {
description("This tests that navigating in a multiselect list updates selection and the active selected option and sends a notification.");
assert_exists(window, 'accessibilityController');
if (window.accessibilityController) {
var menulist = document.getElementById("menulist");
menulist.focus();
window.accessibleMenulist = accessibilityController.focusedElement;
......@@ -17,50 +27,52 @@
window.accessibleThree = accessibleMenulist.childAtIndex(2);
function listListener(notification) {
document.getElementById("console").innerText += "List notification: " + notification + "\n";
assert_less_than(notificationReceivedIndex, expectedNotifications.length);
assert_equals(notification, expectedNotifications[notificationReceivedIndex],
`Notification ${notificationReceivedIndex}`);
++notificationReceivedIndex;
}
accessibleMenulist.addNotificationListener(listListener);
shouldBe("accessibleOne.isSelected", "true");
shouldBe("accessibleOne.isSelectedOptionActive", "true");
shouldBe("accessibleTwo.isSelected", "false");
shouldBe("accessibleTwo.isSelectedOptionActive", "false");
shouldBe("accessibleThree.isSelected", "false");
shouldBe("accessibleThree.isSelectedOptionActive", "false");
assert_true(accessibleOne.isSelected);
assert_true(accessibleOne.isSelectedOptionActive);
assert_false(accessibleTwo.isSelected);
assert_false(accessibleTwo.isSelectedOptionActive);
assert_false(accessibleThree.isSelected);
assert_false(accessibleThree.isSelectedOptionActive);
// Change the selected index by simulating a down arrow keydown event.
eventSender.keyDown('ArrowDown', []);
shouldBe("accessibleOne.isSelected", "false");
shouldBe("accessibleOne.isSelectedOptionActive", "false");
shouldBe("accessibleTwo.isSelected", "true");
shouldBe("accessibleTwo.isSelectedOptionActive", "true");
shouldBe("accessibleThree.isSelected", "false");
shouldBe("accessibleThree.isSelectedOptionActive", "false");
assert_false(accessibleOne.isSelected);
assert_false(accessibleOne.isSelectedOptionActive);
assert_true(accessibleTwo.isSelected);
assert_true(accessibleTwo.isSelectedOptionActive);
assert_false(accessibleThree.isSelected);
assert_false(accessibleThree.isSelectedOptionActive);
// Extend the selection by simulating a Shift + Down Arrow keydown event.
eventSender.keyDown('ArrowDown', ['shiftKey']);
shouldBe("accessibleOne.isSelected", "false");
shouldBe("accessibleOne.isSelectedOptionActive", "false");
shouldBe("accessibleTwo.isSelected", "true");
shouldBe("accessibleTwo.isSelectedOptionActive", "false");
shouldBe("accessibleThree.isSelected", "true");
shouldBe("accessibleThree.isSelectedOptionActive", "true");
}
assert_false(accessibleOne.isSelected);
assert_false(accessibleOne.isSelectedOptionActive);
assert_true(accessibleTwo.isSelected);
assert_false(accessibleTwo.isSelectedOptionActive);
assert_true(accessibleThree.isSelected);
assert_true(accessibleThree.isSelectedOptionActive);
// Make the test finish quickly whether we get the notification or not.
window.setTimeout(function() {
debug('<br /><span class="pass">TEST COMPLETE</span>');
testCase.step_timeout(function() {
if (window.accessibilityController)
accessibleMenulist.removeNotificationListener();
if (window.testRunner)
testRunner.notifyDone();
assert_equals(notificationReceivedIndex, expectedNotifications.length,
'All notifications received');
testCase.done();
}, 10);
}
window.addEventListener('load', function() {
setTimeout(runTest, 10);
testCase.step_timeout(runTest, 10);
}, false);
</script>
</head>
......@@ -74,7 +86,6 @@
</select>
<p id="description"></p>
<div id="console"></div>
</body>
</html>
PASS computedMarginLeft("simple-all") is "25px"
PASS computedMarginTop("simple-all") is "25px"
PASS computedMarginRight("simple-all") is "25px"
PASS computedMarginBottom("simple-all") is "25px"
PASS computedMarginLeft("simple-left") is "25px"
PASS computedMarginTop("simple-left") is "0px"
PASS computedMarginRight("simple-left") is "0px"
PASS computedMarginBottom("simple-left") is "0px"
PASS computedMarginLeft("simple-right") is "0px"
PASS computedMarginTop("simple-right") is "0px"
PASS computedMarginRight("simple-right") is "25px"
PASS computedMarginBottom("simple-right") is "0px"
PASS computedMarginLeft("simple-top") is "0px"
PASS computedMarginTop("simple-top") is "25px"
PASS computedMarginRight("simple-top") is "0px"
PASS computedMarginBottom("simple-top") is "0px"
PASS computedMarginLeft("simple-bottom") is "0px"
PASS computedMarginTop("simple-bottom") is "0px"
PASS computedMarginRight("simple-bottom") is "0px"
PASS computedMarginBottom("simple-bottom") is "25px"
PASS computedMarginLeft("percent-all") is "25px"
PASS computedMarginTop("percent-all") is "25px"
PASS computedMarginRight("percent-all") is "25px"
PASS computedMarginBottom("percent-all") is "25px"
PASS computedMarginLeft("percent-left") is "25px"
PASS computedMarginTop("percent-left") is "0px"
PASS computedMarginRight("percent-left") is "0px"
PASS computedMarginBottom("percent-left") is "0px"
PASS computedMarginLeft("percent-right") is "0px"
PASS computedMarginTop("percent-right") is "0px"
PASS computedMarginRight("percent-right") is "25px"
PASS computedMarginBottom("percent-right") is "0px"
PASS computedMarginLeft("percent-top") is "0px"
PASS computedMarginTop("percent-top") is "25px"
PASS computedMarginRight("percent-top") is "0px"
PASS computedMarginBottom("percent-top") is "0px"
PASS computedMarginLeft("percent-bottom") is "0px"
PASS computedMarginTop("percent-bottom") is "0px"
PASS computedMarginRight("percent-bottom") is "0px"
PASS computedMarginBottom("percent-bottom") is "25px"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
div { display: inline-block; }
p { width: 200px; height: 120px; margin: 0px; }
......@@ -81,10 +82,12 @@
break;
}
shouldBeEqualToString('computedMarginLeft("' + innerElement.id + '")', expectedLeft);
shouldBeEqualToString('computedMarginTop("' + innerElement.id + '")', expectedTop);
shouldBeEqualToString('computedMarginRight("' + innerElement.id + '")', expectedRight);
shouldBeEqualToString('computedMarginBottom("' + innerElement.id + '")', expectedBottom);
test(() => {
assert_equals(computedMarginLeft(innerElement.id), expectedLeft, 'margin-left');
assert_equals(computedMarginTop(innerElement.id), expectedTop, 'margin-top');
assert_equals(computedMarginRight(innerElement.id), expectedRight, 'margin-right');
assert_equals(computedMarginBottom(innerElement.id), expectedBottom, 'margin-bottom');
}, innerElement.id);
}
if (window.testRunner) {
......
Test for crbug.com/172051: all shorthand property.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS cssRules.length is 18
PASS cssRules[0].cssText is "div { all: initial; }"
PASS cssRules[1].cssText is not "div { all: initial; color: red; }"
PASS contains(cssRules[1].cssText, "color: red;") is true
PASS contains(cssRules[1].cssText, "background: initial;") is true
PASS contains(cssRules[1].cssText, "direction: ") is false
PASS contains(cssRules[1].cssText, "unicode-bidi: ") is false
PASS cssRules[2].cssText is "div { all: initial; }"
PASS cssRules[3].cssText is "div { all: initial !important; }"
PASS cssRules[4].cssText is not "div { all: initial; color: red !important; }"
PASS contains(cssRules[4].cssText, "color: red !important;") is true
PASS contains(cssRules[4].cssText, "background: initial;") is true
PASS contains(cssRules[4].cssText, "direction: ") is false
PASS contains(cssRules[4].cssText, "unicode-bidi: ") is false
PASS cssRules[5].cssText is "div { all: inherit; }"
PASS cssRules[6].cssText is not "div { all: inherit; color: red; }"
PASS contains(cssRules[6].cssText, "color: red;") is true
PASS contains(cssRules[6].cssText, "direction: ") is false
PASS contains(cssRules[6].cssText, "unicode-bidi: ") is false
PASS cssRules[7].cssText is "div { all: inherit; }"
PASS cssRules[8].cssText is "div { all: inherit !important; }"
PASS cssRules[9].cssText is not "div { all: inherit; color: red !important; }"
PASS contains(cssRules[9].cssText, "color: red !important") is true
PASS contains(cssRules[9].cssText, "background: inherit;") is true
PASS contains(cssRules[9].cssText, "direction: ") is false
PASS contains(cssRules[9].cssText, "unicode-bidi: ") is false
PASS cssRules[10].cssText is "div { }"
PASS cssRules[11].cssText is "div { all: initial; direction: rtl; }"
PASS cssRules[12].cssText is "div { direction: ltr; unicode-bidi: bidi-override; all: initial !important; }"
PASS contains(cssRules[13].cssText, "all: initial;") is false
PASS contains(cssRules[13].cssText, "-internal-") is false
PASS contains(cssRules[13].cssText, "direction: ltr;") is true
PASS contains(cssRules[13].cssText, "color: red;") is true
PASS contains(cssRules[14].cssText, "all: initial;") is false
PASS contains(cssRules[14].cssText, "-internal-") is false
PASS contains(cssRules[14].cssText, "font: initial;") is false
PASS contains(cssRules[14].cssText, "font-family: initial;") is true
PASS contains(cssRules[15].cssText, "all: initial;") is false
PASS contains(cssRules[15].cssText, "-internal-") is false
PASS contains(cssRules[14].cssText, "font: initial;") is false
PASS contains(cssRules[14].cssText, "marker: initial;") is true
PASS contains(cssRules[15].cssText, "width: inherit;") is true
PASS contains(cssRules[15].cssText, "min-width: initial;") is true
PASS contains(cssRules[15].cssText, "max-width: initial;") is true
PASS contains(cssRules[15].cssText, "marker-start: initial;") is false
PASS contains(cssRules[15].cssText, "marker-mid: initial;") is false
PASS contains(cssRules[15].cssText, "marker-end: initial;") is false
PASS cssRules[16].cssText is "div { all: unset; }"
PASS contains(cssRules[17].cssText, "all: unset;") is false
PASS contains(cssRules[17].cssText, "color: red;") is true
PASS contains(cssRules[17].cssText, "display: unset;") is true
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style id="style">
div { all: initial; }
div { all: initial; color: red; }
div { color: red; all: initial; }
......@@ -27,71 +28,71 @@ div { all: unset; }
div { all: unset; color: red; }
</style>
<script>
description('Test for crbug.com/172051: all shorthand property.');
function contains(cssText, property) {
return cssText.indexOf(property) == 0 || cssText.indexOf(' ' + property) != -1;
}
var cssRules = document.styleSheets[1].cssRules;
shouldBe('cssRules.length', '18');
shouldBe('cssRules[0].cssText', '"div { all: initial; }"');
shouldNotBe('cssRules[1].cssText', '"div { all: initial; color: red; }"');
shouldBeTrue('contains(cssRules[1].cssText, "color: red;")');
shouldBeTrue('contains(cssRules[1].cssText, "background: initial;")');
shouldBeFalse('contains(cssRules[1].cssText, "direction: ")');
shouldBeFalse('contains(cssRules[1].cssText, "unicode-bidi: ")');
shouldBe('cssRules[2].cssText', '"div { all: initial; }"');
shouldBe('cssRules[3].cssText', '"div { all: initial !important; }"');
shouldNotBe('cssRules[4].cssText', '"div { all: initial; color: red !important; }"');
shouldBeTrue('contains(cssRules[4].cssText, "color: red !important;")');
shouldBeTrue('contains(cssRules[4].cssText, "background: initial;")');
shouldBeFalse('contains(cssRules[4].cssText, "direction: ")');
shouldBeFalse('contains(cssRules[4].cssText, "unicode-bidi: ")');
shouldBe('cssRules[5].cssText', '"div { all: inherit; }"');
shouldNotBe('cssRules[6].cssText', '"div { all: inherit; color: red; }"');
shouldBeTrue('contains(cssRules[6].cssText, "color: red;")');
shouldBeFalse('contains(cssRules[6].cssText, "direction: ")');
shouldBeFalse('contains(cssRules[6].cssText, "unicode-bidi: ")');
shouldBe('cssRules[7].cssText', '"div { all: inherit; }"');
shouldBe('cssRules[8].cssText', '"div { all: inherit !important; }"');
shouldNotBe('cssRules[9].cssText', '"div { all: inherit; color: red !important; }"');
shouldBeTrue('contains(cssRules[9].cssText, "color: red !important")');
shouldBeTrue('contains(cssRules[9].cssText, "background: inherit;")');
shouldBeFalse('contains(cssRules[9].cssText, "direction: ")');
shouldBeFalse('contains(cssRules[9].cssText, "unicode-bidi: ")');
shouldBe('cssRules[10].cssText', '"div { }"');
shouldBe('cssRules[11].cssText', '"div { all: initial; direction: rtl; }"');
shouldBe('cssRules[12].cssText', '"div { direction: ltr; unicode-bidi: bidi-override; all: initial !important; }"');
shouldBeFalse('contains(cssRules[13].cssText, "all: initial;")');
shouldBeFalse('contains(cssRules[13].cssText, "-internal-")');
shouldBeTrue('contains(cssRules[13].cssText, "direction: ltr;")');
shouldBeTrue('contains(cssRules[13].cssText, "color: red;")');
shouldBeFalse('contains(cssRules[14].cssText, "all: initial;")');
shouldBeFalse('contains(cssRules[14].cssText, "-internal-")');
shouldBeFalse('contains(cssRules[14].cssText, "font: initial;")');
shouldBeTrue('contains(cssRules[14].cssText, "font-family: initial;")');
shouldBeFalse('contains(cssRules[15].cssText, "all: initial;")');
shouldBeFalse('contains(cssRules[15].cssText, "-internal-")');
shouldBeFalse('contains(cssRules[14].cssText, "font: initial;")');
shouldBeTrue('contains(cssRules[14].cssText, "marker: initial;")');
shouldBeTrue('contains(cssRules[15].cssText, "width: inherit;")');
shouldBeTrue('contains(cssRules[15].cssText, "min-width: initial;")');
shouldBeTrue('contains(cssRules[15].cssText, "max-width: initial;")');
shouldBeFalse('contains(cssRules[15].cssText, "marker-start: initial;")');
shouldBeFalse('contains(cssRules[15].cssText, "marker-mid: initial;")');
shouldBeFalse('contains(cssRules[15].cssText, "marker-end: initial;")');
shouldBe('cssRules[16].cssText', '"div { all: unset; }"');
shouldBeFalse('contains(cssRules[17].cssText, "all: unset;")');
shouldBeTrue('contains(cssRules[17].cssText, "color: red;")');
shouldBeTrue('contains(cssRules[17].cssText, "display: unset;")');
var cssRules = document.getElementById('style').sheet.cssRules;
test(() => {
assert_equals(cssRules.length, 18);
assert_equals(cssRules[0].cssText, "div { all: initial; }");
assert_not_equals(cssRules[1].cssText, "div { all: initial; color: red; }");
assert_true(contains(cssRules[1].cssText, "color: red;"));
assert_true(contains(cssRules[1].cssText, "background: initial;"));
assert_false(contains(cssRules[1].cssText, "direction: "));
assert_false(contains(cssRules[1].cssText, "unicode-bidi: "));
assert_equals(cssRules[2].cssText, "div { all: initial; }");
assert_equals(cssRules[3].cssText, "div { all: initial !important; }");
assert_not_equals(cssRules[4].cssText, "div { all: initial; color: red !important; }");
assert_true(contains(cssRules[4].cssText, "color: red !important;"));
assert_true(contains(cssRules[4].cssText, "background: initial;"));
assert_false(contains(cssRules[4].cssText, "direction: "));
assert_false(contains(cssRules[4].cssText, "unicode-bidi: "));
assert_equals(cssRules[5].cssText, "div { all: inherit; }");
assert_not_equals(cssRules[6].cssText, "div { all: inherit; color: red; }");
assert_true(contains(cssRules[6].cssText, "color: red;"));
assert_false(contains(cssRules[6].cssText, "direction: "));
assert_false(contains(cssRules[6].cssText, "unicode-bidi: "));
assert_equals(cssRules[7].cssText, "div { all: inherit; }");
assert_equals(cssRules[8].cssText, "div { all: inherit !important; }");
assert_not_equals(cssRules[9].cssText, "div { all: inherit; color: red !important; }");
assert_true(contains(cssRules[9].cssText, "color: red !important"));
assert_true(contains(cssRules[9].cssText, "background: inherit;"));
assert_false(contains(cssRules[9].cssText, "direction: "));
assert_false(contains(cssRules[9].cssText, "unicode-bidi: "));
assert_equals(cssRules[10].cssText, "div { }");
assert_equals(cssRules[11].cssText, "div { all: initial; direction: rtl; }");
assert_equals(cssRules[12].cssText, "div { direction: ltr; unicode-bidi: bidi-override; all: initial !important; }");
assert_false(contains(cssRules[13].cssText, "all: initial;"));
assert_false(contains(cssRules[13].cssText, "-internal-"));
assert_true(contains(cssRules[13].cssText, "direction: ltr;"));
assert_true(contains(cssRules[13].cssText, "color: red;"));
assert_false(contains(cssRules[14].cssText, "all: initial;"));
assert_false(contains(cssRules[14].cssText, "-internal-"));
assert_false(contains(cssRules[14].cssText, "font: initial;"));
assert_true(contains(cssRules[14].cssText, "font-family: initial;"));
assert_false(contains(cssRules[15].cssText, "all: initial;"));
assert_false(contains(cssRules[15].cssText, "-internal-"));
assert_false(contains(cssRules[14].cssText, "font: initial;"));
assert_true(contains(cssRules[14].cssText, "marker: initial;"));
assert_true(contains(cssRules[15].cssText, "width: inherit;"));
assert_true(contains(cssRules[15].cssText, "min-width: initial;"));
assert_true(contains(cssRules[15].cssText, "max-width: initial;"));
assert_false(contains(cssRules[15].cssText, "marker-start: initial;"));
assert_false(contains(cssRules[15].cssText, "marker-mid: initial;"));
assert_false(contains(cssRules[15].cssText, "marker-end: initial;"));
assert_equals(cssRules[16].cssText, "div { all: unset; }");
assert_false(contains(cssRules[17].cssText, "all: unset;"));
assert_true(contains(cssRules[17].cssText, "color: red;"));
assert_true(contains(cssRules[17].cssText, "display: unset;"));
}, 'Test for crbug.com/172051: all shorthand property.');
</script>
Make sure the focus management API is available to XML documents.On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".PASS document.__proto__ is not HTMLDocument.prototype
PASS document.__proto__ is XMLDocument.prototype
PASS document.hasFocus() is true
PASS document.activeElement is document.body
PASS document.activeElement is testElement
PASS document.hasFocus() is true
PASS successfullyParsed is true
TEST COMPLETE
......@@ -2,21 +2,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="../../../resources/js-test.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
</head>
<body>
<input id="testElement"></input>
<script>
description("Make sure the focus management API is available to XML documents.");
shouldNotBe('document.__proto__', 'HTMLDocument.prototype');
shouldBe('document.__proto__', 'XMLDocument.prototype');
shouldBeTrue('document.hasFocus()');
shouldBe('document.activeElement', 'document.body');
var testElement = document.getElementById('testElement');
testElement.focus();
shouldBe('document.activeElement', 'testElement');
shouldBeTrue('document.hasFocus()');
test(() => {
assert_not_equals(document.__proto__, HTMLDocument.prototype);
assert_equals(document.__proto__, XMLDocument.prototype);
assert_true(document.hasFocus());
assert_equals(document.activeElement, document.body);
var testElement = document.getElementById('testElement');
testElement.focus();
assert_equals(document.activeElement, testElement);
assert_true(document.hasFocus());
}, "Focus management API is available to XML documents.");
</script>
</body>
</html>
Accessing an XML element that looks like a Custom Element should not crash.On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".PASS document.getElementById("t") instanceof Element is true
PASS successfullyParsed is true
TEST COMPLETE
.pass {font-weight: bold;color: green;}.fail {font-weight: bold;color: red;}#console {white-space: pre-wrap;font-family: monospace;}
<html xmlns="http://www.w3.org/1999/xhtml"><x-test is="x-a" id="t"></x-test>
<script src="../../../resources/js-test.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script><![CDATA[
description('Accessing an XML element that looks like a Custom Element ' +
test(() => assert_true(document.getElementById("t") instanceof Element),
'Accessing an XML element that looks like a Custom Element ' +
'should not crash.');
shouldBeTrue('document.getElementById("t") instanceof Element');
var successfullyParsed = true;
]]></script>
</html>
Make sure the focus management API is available to XML documents.On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".PASS document.__proto__ is not HTMLDocument.prototype
PASS document.__proto__ is XMLDocument.prototype
PASS document.hasFocus() is true
PASS document.activeElement is document.body
PASS document.activeElement is testElement
PASS document.hasFocus() is true
PASS successfullyParsed is true
TEST COMPLETE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment