Bug 1367307 - Add content property to create pseudo element in web-platform-tests and devtools tests too; r=hiro
authorBrian Birtles <birtles@gmail.com>
Fri, 09 Jun 2017 11:30:04 +0900
changeset 411274 45a389969f2594c63f22e4fcf3c4dcb17a702915
parent 411273 ad1958745d3f41283a4892efdad0f17381fef84c
child 411275 830842118f8a0f636aa298dd27a34918d924f746
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1367307
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367307 - Add content property to create pseudo element in web-platform-tests and devtools tests too; r=hiro MozReview-Commit-ID: 35F2Cu1w0N7
dom/animation/test/chrome/test_animation_observers_sync.html
testing/web-platform/tests/web-animations/testcommon.js
--- a/dom/animation/test/chrome/test_animation_observers_sync.html
+++ b/dom/animation/test/chrome/test_animation_observers_sync.html
@@ -72,17 +72,18 @@ function assert_equals_records(actual, e
     assert_record_list(actual[i].removedAnimations,
                        expected[i].removed, desc, i, "removedAnimations");
   }
 }
 
 // Create a pseudo element
 function createPseudo(test, element, type) {
   addStyle(test, { '@keyframes anim': '',
-                   ['.pseudo::' + type]: 'animation: anim 10s;' });
+                   ['.pseudo::' + type]: 'animation: anim 10s; ' +
+                                         'content: \'\';'  });
   element.classList.add('pseudo');
   var anims = document.getAnimations();
   assert_true(anims.length >= 1);
   var anim = anims[anims.length - 1];
   assert_equals(anim.effect.target.parentElement, element);
   assert_equals(anim.effect.target.type, '::' + type);
   anim.cancel();
   return anim.effect.target;
--- a/testing/web-platform/tests/web-animations/testcommon.js
+++ b/testing/web-platform/tests/web-animations/testcommon.js
@@ -73,17 +73,18 @@ function createStyle(test, rules, doc) {
   test.add_cleanup(function() {
     extraStyle.remove();
   });
 }
 
 // Create a pseudo element
 function createPseudo(test, type) {
   createStyle(test, { '@keyframes anim': '',
-                      ['.pseudo::' + type]: 'animation: anim 10s;' });
+                      ['.pseudo::' + type]: 'animation: anim 10s; ' +
+                                            'content: \'\';'  });
   var div = createDiv(test);
   div.classList.add('pseudo');
   var anims = document.getAnimations();
   assert_true(anims.length >= 1);
   var anim = anims[anims.length - 1];
   assert_equals(anim.effect.target.parentElement, div);
   assert_equals(anim.effect.target.type, '::' + type);
   anim.cancel();