Bug 1382841 - Remove old test_XXX openers that just set the dom.animations-api.core.enabled pref from layout/style/test**; r=hiro
As with an earlier patch in this series, we rename the file_* test content files
to test_*_to_rename.html in this patch, and then in a subsequent patch drop the
_to_rename suffix so that we can trace the history of the test_* files back to
their file_* equivalents.
MozReview-Commit-ID: Jes8xSQzkCF
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -1,9 +1,11 @@
[DEFAULT]
+prefs =
+ dom.animations-api.core.enabled=true
support-files =
animation_utils.js
ccd-quirks.html
ccd.sjs
ccd-standards.html
chrome/bug418986-2.js
chrome/match.png
chrome/mismatch.png
@@ -44,45 +46,37 @@ support-files = additional_sheets_helper
[test_align_shorthand_serialization.html]
skip-if = stylo # bug 1339656
[test_all_shorthand.html]
[test_animations.html]
skip-if = (toolkit == 'android')
[test_animations_async_tests.html]
support-files = Ahem.ttf file_animations_async_tests.html
[test_animations_dynamic_changes.html]
-[test_animations_effect_timing_duration.html]
-support-files = file_animations_effect_timing_duration.html
+[test_animations_effect_timing_duration_to_rename.html]
skip-if = webrender # bug 1424752
-[test_animations_effect_timing_enddelay.html]
-support-files = file_animations_effect_timing_enddelay.html
+[test_animations_effect_timing_enddelay_to_rename.html]
skip-if = webrender # bug 1424752
-[test_animations_effect_timing_iterations.html]
-support-files = file_animations_effect_timing_iterations.html
+[test_animations_effect_timing_iterations_to_rename.html]
skip-if = webrender # bug 1424752
[test_animations_event_order.html]
[test_animations_event_handler_attribute.html]
-[test_animations_iterationstart.html]
-support-files = file_animations_iterationstart.html
+[test_animations_iterationstart_to_rename.html]
skip-if = webrender # bug 1424752
[test_animations_omta.html]
skip-if = webrender # bug 1424752
[test_animations_omta_start.html]
skip-if = webrender # bug 1424752
-[test_animations_pausing.html]
-support-files = file_animations_pausing.html
+[test_animations_pausing_to_rename.html]
skip-if = webrender # bug 1424752
-[test_animations_playbackrate.html]
-support-files = file_animations_playbackrate.html
+[test_animations_playbackrate_to_rename.html]
skip-if = webrender # bug 1424752
-[test_animations_reverse.html]
-support-files = file_animations_reverse.html
+[test_animations_reverse_to_rename.html]
skip-if = webrender # bug 1424752
-[test_animations_styles_on_event.html]
-support-files = file_animations_styles_on_event.html
+[test_animations_styles_on_event_to_rename.html]
[test_animations_variable_changes.html]
[test_animations_with_disabled_properties.html]
support-files = file_animations_with_disabled_properties.html
[test_any_dynamic.html]
[test_asyncopen2.html]
[test_at_rule_parse_serialize.html]
[test_attribute_selector_eof_behavior.html]
[test_background_blend_mode.html]
@@ -322,18 +316,17 @@ skip-if = !stylo
[test_transitions_computed_value_combinations.html]
[test_transitions_events.html]
[test_transitions.html]
skip-if = (android_version == '18' && debug) # bug 1159532
[test_transitions_bug537151.html]
[test_transitions_dynamic_changes.html]
[test_transitions_per_property.html]
skip-if = (toolkit == 'android') || webrender # bug 775227 for android, bug 1424752 for webrender
-[test_transitions_replacement_on_busy_frame.html]
-support-files = file_transitions_replacement_on_busy_frame.html
+[test_transitions_replacement_on_busy_frame_to_rename.html]
[test_transitions_step_functions.html]
[test_transitions_with_disabled_properties.html]
support-files = file_transitions_with_disabled_properties.html
[test_unclosed_parentheses.html]
[test_unicode_range_loading.html]
support-files = ../../reftests/fonts/markA.woff ../../reftests/fonts/markB.woff ../../reftests/fonts/markC.woff ../../reftests/fonts/markD.woff
[test_units_angle.html]
[test_units_frequency.html]
deleted file mode 100644
--- a/layout/style/test/test_animations_effect_timing_duration.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for animation.effect.timing on compositor</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_effect_timing_duration.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_effect_timing_duration.html
rename to layout/style/test/test_animations_effect_timing_duration_to_rename.html
--- a/layout/style/test/file_animations_effect_timing_duration.html
+++ b/layout/style/test/test_animations_effect_timing_duration_to_rename.html
@@ -1,47 +1,43 @@
<!DOCTYPE html>
<html>
<head>
+ <title>
+ Test for Animation.effect.timing.duration on compositor animations
+ </title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
@keyframes anim {
0% { transform: translate(0px) }
100% { transform: translate(100px) }
}
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div ] = new_div("");
var animation = div.animate(
[ { transform: 'translate(0px)', easing: "steps(2, start)" },
{ transform: 'translate(100px)' } ], 4000);
await waitForPaints();
deleted file mode 100644
--- a/layout/style/test/test_animations_effect_timing_enddelay.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for animation.effect.timing.endDelay on compositor</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_effect_timing_enddelay.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_effect_timing_enddelay.html
rename to layout/style/test/test_animations_effect_timing_enddelay_to_rename.html
--- a/layout/style/test/file_animations_effect_timing_enddelay.html
+++ b/layout/style/test/test_animations_effect_timing_enddelay_to_rename.html
@@ -1,43 +1,37 @@
<!DOCTYPE html>
<html>
<head>
+ <title>Test for Animation.effect.endDelay on compositor animations</title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div ] = new_div("");
var animation = div.animate(
[ { transform: 'translate(0px)' }, { transform: 'translate(100px)' } ],
{ duration: 1000, fill: 'none' });
await waitForPaints();
deleted file mode 100644
--- a/layout/style/test/test_animations_effect_timing_iterations.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for animation.effect.timing.iterations on compositor</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_effect_timing_iterations.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_effect_timing_iterations.html
rename to layout/style/test/test_animations_effect_timing_iterations_to_rename.html
--- a/layout/style/test/file_animations_effect_timing_iterations.html
+++ b/layout/style/test/test_animations_effect_timing_iterations_to_rename.html
@@ -1,47 +1,43 @@
<!DOCTYPE html>
<html>
<head>
+ <title>
+ Test for Animation.effect.timing.iterations on compositor animations
+ </title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
@keyframes anim {
0% { transform: translate(0px) }
100% { transform: translate(100px) }
}
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div ] = new_div("");
var animation = div.animate(
[ { transform: 'translate(0px)' },
{ transform: 'translate(100px)' } ],
{ duration: 4000,
iterations: 2
deleted file mode 100644
--- a/layout/style/test/test_animations_iterationstart.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1248338
--->
-<head>
- <title>Test for iterationStart on compositor animations (Bug 1248338)</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1248338">Mozilla Bug 1248338</a>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_iterationstart.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_iterationstart.html
rename to layout/style/test/test_animations_iterationstart_to_rename.html
--- a/layout/style/test/file_animations_iterationstart.html
+++ b/layout/style/test/test_animations_iterationstart_to_rename.html
@@ -1,44 +1,39 @@
<!DOCTYPE html>
<html>
<head>
+ <title>
+ Test for Animation.effect.timing.iterationStart on compositor animations
+ </title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
-
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div ] = new_div("test");
var animation = div.animate(
{ transform: ["translate(0px)", "translate(100px)"] },
{ iterationStart: 0.5, duration: 10000, fill: "both"}
);
await waitForPaints();
deleted file mode 100644
--- a/layout/style/test/test_animations_pausing.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1070745
--->
-<head>
- <title>Test for play() and pause() on animations (Bug 1070745)</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1070745">Mozilla Bug 1070745</a>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_pausing.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_pausing.html
rename to layout/style/test/test_animations_pausing_to_rename.html
--- a/layout/style/test/file_animations_pausing.html
+++ b/layout/style/test/test_animations_pausing_to_rename.html
@@ -1,47 +1,43 @@
<!DOCTYPE html>
<html>
<head>
+ <title>
+ Test for Animation.play() and Animation.pause() on compositor animations
+ </title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
@keyframes anim {
0% { transform: translate(0px) }
100% { transform: translate(100px) }
}
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div, cs ] = new_div("animation: anim 10s 2 linear alternate");
// Animation is initially running on compositor
await waitForPaintsFlushed();
advance_clock(1000);
omta_is(div, "transform", { tx: 10 }, RunningOn.Compositor,
deleted file mode 100644
--- a/layout/style/test/test_animations_playbackrate.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1175751
--->
-<head>
- <title>Test for Animation.playbackRate on compositor animations (Bug 1175751)</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1175751">Mozilla Bug 1175751</a>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_playbackrate.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_playbackrate.html
rename to layout/style/test/test_animations_playbackrate_to_rename.html
--- a/layout/style/test/file_animations_playbackrate.html
+++ b/layout/style/test/test_animations_playbackrate_to_rename.html
@@ -1,47 +1,41 @@
<!DOCTYPE html>
<html>
<head>
+ <title>Test for Animation.playbackRate on compositor animations</title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
@keyframes anim {
0% { transform: translate(0px) }
100% { transform: translate(100px) }
}
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div, cs ] = new_div("animation: anim 10s 1 linear forwards");
var animation = div.getAnimations()[0];
animation.playbackRate = 10;
advance_clock(300);
deleted file mode 100644
--- a/layout/style/test/test_animations_reverse.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1343589
--->
-<head>
- <meta charset=utf-8>
- <title>Test for Animation.reverse() on compositor animations (Bug 1343589)</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=1343589">Mozilla Bug 1343589</a>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_reverse.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_reverse.html
rename to layout/style/test/test_animations_reverse_to_rename.html
--- a/layout/style/test/file_animations_reverse.html
+++ b/layout/style/test/test_animations_reverse_to_rename.html
@@ -1,25 +1,19 @@
<!doctype html>
<html>
<head>
<meta charset=utf-8>
+ <title>Test for Animation.reverse() on compositor animations</title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript" src="animation_utils.js"></script>
- <script>
- var ok = opener.ok.bind(opener);
- var is = opener.is.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
@keyframes anim {
0% { transform: translate(0px) }
100% { transform: translate(100px) }
}
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
@@ -28,21 +22,21 @@
}
</style>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
"use strict";
+SimpleTest.waitForExplicitFinish();
+
runOMTATest(function() {
- runAllAsyncAnimTests().then(function() {
- finish();
- });
-}, finish, opener.SpecialPowers);
+ runAllAsyncAnimTests().then(SimpleTest.finish);
+}, SimpleTest.finish, SpecialPowers);
addAsyncAnimTest(async function() {
var [ div, cs ] = new_div("animation: anim 10s linear");
const animation = div.getAnimations()[0];
// Animation is initially running on compositor
await waitForPaintsFlushed();
advance_clock(5000);
deleted file mode 100644
--- a/layout/style/test/test_animations_styles_on_event.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1228137
--->
-<head>
- <title>Test that mouse movement immediately after finish() should involve restyling for finished state(Bug 1228137)</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1219236">Mozilla Bug 1228137</a>
-<div id="display"></div>
-<pre id="test">
-<script type="application/javascript">
-"use strict";
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { "set": [[ "dom.animations-api.core.enabled", true]] },
- function() {
- window.open("file_animations_styles_on_event.html");
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_animations_styles_on_event.html
rename to layout/style/test/test_animations_styles_on_event_to_rename.html
--- a/layout/style/test/file_animations_styles_on_event.html
+++ b/layout/style/test/test_animations_styles_on_event_to_rename.html
@@ -1,43 +1,42 @@
<!DOCTYPE html>
<html>
<head>
+ <title>
+ Test that mouse movement immediately after finish() should involve
+ restyling for finished state (Bug 1228137)
+ </title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript"
src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style type="text/css">
@keyframes anim {
0% { transform: translateX(0px) }
100% { transform: translateX(100px) }
}
.target {
/* The animation target needs geometry in order to qualify for OMTA */
width: 100px;
height: 100px;
background-color: white;
}
</style>
- <script>
- var is = opener.is.bind(opener);
- var ok = opener.ok.bind(opener);
- var todo = opener.todo.bind(opener);
- function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
- }
- </script>
</head>
<body>
<div id="display"></div>
<script type="application/javascript">
+SimpleTest.waitForExplicitFinish();
+
window.onload = function () {
// To avoid the effect that newly created element's styles are
// not updated immediately, we need to add an element without
// animation properties first.
var [ div ] = new_div("");
div.setAttribute("id", "bug1228137");
waitForPaints().then(function() {
@@ -46,17 +45,17 @@ window.onload = function () {
// Now we can set animation properties.
div.style.animation = "anim 100s linear forwards";
div.addEventListener("mousemove", function(event) {
is(event.target.id, "bug1228137",
"The target of the animation should receive the mouse move event " +
"on the position of the animation's effect end.");
done_div();
- finish();
+ SimpleTest.finish();
});
var animation = div.getAnimations()[0];
animation.finish();
// Mouse over where the animation is positioned at finished state.
// We can't use synthesizeMouse here since synthesizeMouse causes
// layout flush. We need to check the position without explicit flushes.
--- a/layout/style/test/test_animations_with_disabled_properties.html
+++ b/layout/style/test/test_animations_with_disabled_properties.html
@@ -20,15 +20,14 @@ https://bugzilla.mozilla.org/show_bug.cg
SimpleTest.waitForExplicitFinish();
/*
* This test relies on the fact that the -webkit-text-fill-color property
* is disabled by the layout.css.prefixes.webkit pref. If we ever remove that
* pref we will need to substitute some other pref:property combination.
*/
SpecialPowers.pushPrefEnv(
- { 'set': [[ 'dom.animations-api.core.enabled', true ],
- [ 'layout.css.prefixes.webkit', false ]] },
+ { 'set': [[ 'layout.css.prefixes.webkit', false ]] },
() => window.open('file_animations_with_disabled_properties.html'));
</script>
</pre>
</body>
</html>
deleted file mode 100644
--- a/layout/style/test/test_transitions_replacement_on_busy_frame.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1167519
--->
-<head>
- <title>Test for bug 1167519</title>
- <script type="application/javascript"
- src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=1167519">Mozilla Bug
- 1167519</a>
-<pre id="test">
-<script>
-'use strict';
-
-SimpleTest.waitForExplicitFinish();
-
-SpecialPowers.pushPrefEnv(
- { 'set': [[ 'dom.animations-api.core.enabled', true ]] },
- function() {
- window.open('file_transitions_replacement_on_busy_frame.html');
- });
-</script>
-</pre>
-</body>
-</html>
rename from layout/style/test/file_transitions_replacement_on_busy_frame.html
rename to layout/style/test/test_transitions_replacement_on_busy_frame_to_rename.html
--- a/layout/style/test/file_transitions_replacement_on_busy_frame.html
+++ b/layout/style/test/test_transitions_replacement_on_busy_frame_to_rename.html
@@ -1,48 +1,45 @@
<!doctype html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1167519
-->
<head>
<meta charset=utf-8>
+ <title>Test for bug 1167519</title>
+ <script type="application/javascript"
+ src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/paint_listener.js"></script>
<script src="animation_utils.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<style>
#target {
height: 100px;
width: 100px;
background: green;
transition: transform 100s linear;
}
</style>
</head>
<body>
<div id="target"></div>
<script>
'use strict';
-var ok = opener.ok.bind(opener);
-var isnot = opener.isnot.bind(opener);
-
-function finish() {
- var o = opener;
- self.close();
- o.SimpleTest.finish();
-}
+SimpleTest.waitForExplicitFinish();
var OMTAPrefKey = "layers.offmainthreadcomposition.async-animations";
var omtaEnabled = SpecialPowers.DOMWindowUtils.layerManagerRemote &&
- opener.SpecialPowers.getBoolPref(OMTAPrefKey);
+ SpecialPowers.getBoolPref(OMTAPrefKey);
window.addEventListener("load", function() {
if (!omtaEnabled) {
ok(true, "Skipping the test since OMTA is disabled");
- finish();
+ SimpleTest.finish();
return;
}
var div = document.getElementById("target");
// Start first transition
div.style.transform = "translateX(300px)";
const firstTransition = div.getAnimations()[0];
@@ -84,17 +81,17 @@ window.addEventListener("load", function
var currentPropertyValue = properties[0].values[0].value;
isnot(currentPropertyValue, previousPropertyValue,
"From value of transition is updated since the moment when " +
"it was generated");
isnot(secondTransition.effect.getKeyframes()[0].transform,
previousKeyframeValue,
"Keyframe value of transition is updated since the moment when " +
"it was generated");
- finish();
+ SimpleTest.finish();
});
});
});
});
</script>
</body>
</html>
--- a/layout/style/test/test_transitions_with_disabled_properties.html
+++ b/layout/style/test/test_transitions_with_disabled_properties.html
@@ -14,15 +14,14 @@ https://bugzilla.mozilla.org/show_bug.cg
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1265611">Mozilla Bug
1265611</a>
<pre id="test">
<script>
SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({'set': [['layout.css.prefixes.webkit', false],
- ['dom.animations-api.core.enabled', true]] },
+SpecialPowers.pushPrefEnv({'set': [['layout.css.prefixes.webkit', false]] },
() => window.open('file_transitions_with_disabled_properties.html'));
</script>
</pre>
</body>
</html>