mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
0288650258
In this patch, we add 3 tests: 1. test for blocked domain 2. test for blocked sub-domain 3. test for non-blocked domain MozReview-Commit-ID: JzMImsbGoPr --HG-- extra : rebase_source : 0eed42f6d2815bd8adbb9fb6be54b6feb3b1bcc8
25 lines
812 B
HTML
25 lines
812 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test the mechanism of stylo blocklist</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
SimpleTest.waitForExplicitFinish();
|
|
SpecialPowers.getDOMWindowUtils(window).addToStyloBlocklist("stylo-blocklist.com");
|
|
let win =
|
|
window.open("http://test.stylo-blocklist.com/tests/layout/style/test/stylo_blocked_domain_page.html", "");
|
|
window.onmessage = function (evt) {
|
|
is(evt.data, "TEST-PASS",
|
|
"Document with blocked sub-domain should not use servo backend");
|
|
win.close();
|
|
SpecialPowers.getDOMWindowUtils(window).removeFromStyloBlocklist("stylo-blocklist.com");
|
|
SimpleTest.finish();
|
|
}
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|