Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/soft-navigation-heuristics/resources/soft-navigation-test-helper.js"></script>
<div id="visibleDiv">Visible Text</div>
<div id="hiddenDiv" style="display:none">Hidden Text</div>
<div><button id="navigateButton">Navigate!</button></div>
<script>
promise_test(t => {
const url = '/toggleHidden';
const modifyDOM = () => {
visibleDiv.style.display = 'none';
hiddenDiv.style.display = '';
return hiddenDiv.id;
};
const helper = new SoftNavigationTestHelper(t);
return helper.clickAndExpectSoftNavigation(navigateButton, url, modifyDOM);
}, 'Soft Navigation Detection supports changing inline style display via Element.style');
</script>