зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1673199: Add a test whether it can access a filed in MediaList with normal privilege after accessing with chrome privilege. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95257
This commit is contained in:
Родитель
c0c1814841
Коммит
c3aace4366
|
@ -412,3 +412,4 @@ skip-if = xorigin # Crashes, Assertion failure: mInFlightProcessId == 0, at /bui
|
|||
[test_non_matching_sheet_media.html]
|
||||
[test_use_counters.html]
|
||||
skip-if = !nightly_build
|
||||
[test_medialist_privilege.html]
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<title>Test whether it can access a filed in MediaList with normal privilege after accessing with chrome privilege.</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<style>
|
||||
@media screen and (max-width: 800px) {
|
||||
body {
|
||||
background-color: lime;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const chromeDocument = SpecialPowers.wrap(document);
|
||||
assertMediaText(chromeDocument);
|
||||
assertMediaText(document);
|
||||
|
||||
function assertMediaText(doc) {
|
||||
const stylesheet = doc.styleSheets[0];
|
||||
const rule = stylesheet.cssRules[0];
|
||||
const media = rule.media;
|
||||
is(rule.media.mediaText, "screen and (max-width: 800px)");
|
||||
}
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче