WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
Testcase
background-position-transitions.html (text/html), 1.38 KB, created by
Simon Fraser (smfr)
on 2016-09-10 14:41:13 PDT
(
hide
)
Description:
Testcase
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2016-09-10 14:41:13 PDT
Size:
1.38 KB
patch
obsolete
><!DOCTYPE> > ><html> ><head> > <style> > .box { > height: 100px; > width: 100px; > margin: 10px; > transition-duration: 1s; > transition-timing-function: linear; > } > > #box { > background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0; > transition-property: background-position; > background-position: 20px 20px; > } > > #box.final { > background-position: bottom 20px right 20px; > } > > #box2 { > background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0; > transition-property: background-size; > background-size: 10px 10px; > } > > #box2.final { > background-size: 30px 30px; > } > > </style> > <script src="resources/transition-test-helpers.js" type="text/javascript"></script> > <script> > > const expectedValues = [ > // [time, element-id, property, expected-value, tolerance] > [0.5, 'box', 'background-position', [10, 10], 2], > [0.5, 'box2', 'background-size', [20, 20], 2], > ]; > > function setupTest() > { > document.getElementById('box').className = 'box final'; > document.getElementById('box2').className = 'box final'; > } > > runTransitionTest(expectedValues, setupTest, usePauseAPI); > </script> ></head> ><body> > > <div id="box" class="box"></div> > <div id="box2" class="box"></div> > > <div id="result"> > </div> > ></body> ></html>
<!DOCTYPE> <html> <head> <style> .box { height: 100px; width: 100px; margin: 10px; transition-duration: 1s; transition-timing-function: linear; } #box { background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0; transition-property: background-position; background-position: 20px 20px; } #box.final { background-position: bottom 20px right 20px; } #box2 { background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0; transition-property: background-size; background-size: 10px 10px; } #box2.final { background-size: 30px 30px; } </style> <script src="resources/transition-test-helpers.js" type="text/javascript"></script> <script> const expectedValues = [ // [time, element-id, property, expected-value, tolerance] [0.5, 'box', 'background-position', [10, 10], 2], [0.5, 'box2', 'background-size', [20, 20], 2], ]; function setupTest() { document.getElementById('box').className = 'box final'; document.getElementById('box2').className = 'box final'; } runTransitionTest(expectedValues, setupTest, usePauseAPI); </script> </head> <body> <div id="box" class="box"></div> <div id="box2" class="box"></div> <div id="result"> </div> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 161843
: 288500