blob: 3afee9b4e87e9dd04642296b1ff8cb5712b203b9 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ internal:IsInAppBrowserPrivacyEnabled=true applicationBundleIdentifier=inAppBrowserPrivacyTestIdentifier ] -->
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<script src="/js-test-resources/ui-helper.js"></script>
<script>
description('Tests that an App-Bound Domain gets classified as so');
jsTestIsAsync = true;
testRunner.waitUntilDone();
function askForWebViewCategory() {
testRunner.getWebViewCategory(function (category) {
if (category != "InAppBrowser") {
askForWebViewCategory();
return;
}
testPassed("Success, domain classified as In-App Browser.");
testRunner.notifyDone();
});
}
const destinationOrigin = "http://localhost:8000";
function navigateToNonAppBoundDomain() {
document.location.href = destinationOrigin + "/in-app-browser-privacy/app-bound-domain.html#step2";
}
if (document.location.hash != "#step2") {
testRunner.getWebViewCategory(function (category) {
if (category != "AppBoundDomain") {
testFailed("Failure, starting category not AppBoundDomain");
testRunner.notifyDone();
}
navigateToNonAppBoundDomain();
});
} else {
askForWebViewCategory();
}
setTimeout(function() {
testPassed("Failure, domain not classified as In-App Browser.");
console.log("Test timed out after 20 seconds");
testRunner.notifyDone()
}, 20000);
</script>
</head>
<body>
</body>
</html>