зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1275449 - Part 2: Add a test. r=hiro
MozReview-Commit-ID: 2Cv806FSBU6 --HG-- extra : transplant_source : 0%1C%DFd%D1%7C%EC%15%89h%87j%FE%06%83o%05l%5E%C5
This commit is contained in:
Родитель
4471abc361
Коммит
0a07587d3c
|
@ -86,3 +86,4 @@ skip-if = (toolkit == 'gonk' && debug)
|
|||
[mozilla/test_partial_keyframes.html]
|
||||
[style/test_animation-seeking-with-current-time.html]
|
||||
[style/test_animation-seeking-with-start-time.html]
|
||||
[sandbox/test_set-easing.html]
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<!doctype html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Tests AnimationTimingFunction::SetEasing in sandbox</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script src="/tests/SimpleTest/SpawnTask.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
add_task(function* set_easing() {
|
||||
const div = document.createElement("div");
|
||||
document.body.appendChild(div);
|
||||
div.animate({ opacity: [0, 1] }, 100000 );
|
||||
|
||||
const contentScript = function() {
|
||||
doesThrow(() => {
|
||||
document.getAnimations()[0].effect.timing.easing = "linear";
|
||||
}, "AnimationTimingFunction::SetEasing should throw in sandbox.");
|
||||
};
|
||||
|
||||
const sandbox = new SpecialPowers.Cu.Sandbox(window);
|
||||
sandbox.importFunction(document, "document");
|
||||
sandbox.importFunction(SimpleTest.doesThrow, "doesThrow");
|
||||
SpecialPowers.Cu.evalInSandbox(`(${contentScript.toSource()})()`, sandbox);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
Загрузка…
Ссылка в новой задаче