Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize.html

Issue 1676513003: Move background/webkit-mask shorthands into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review issues Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <div id="test"> </div> 4 <div id="test"> </div>
5 <script> 5 <script>
6 description("Tests a flag to make background shorthand property not override bac kground-size when it's already set."); 6 description("Tests a flag to make background shorthand property not override bac kground-size when it's already set.");
7 7
8 var e = document.getElementById('test'); 8 var e = document.getElementById('test');
9 9
10 if (window.internals) { 10 if (window.internals) {
11 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(true); 11 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(true);
12 12
13 e.style.backgroundSize = "cover"; 13 e.style.backgroundSize = "cover";
14 e.style.background = "center red url(dummy://test.png) no-repeat border-box" ; 14 e.style.background = "center red url(dummy://test.png) no-repeat border-box" ;
15 shouldBeEqualToString("e.style.background", 'url("dummy://test.png") 50% 50% / cover no-repeat border-box border-box red') 15 shouldBeEqualToString("e.style.background", 'url("dummy://test.png") center center / cover no-repeat border-box border-box red')
16 shouldBeEqualToString("e.style.backgroundSize", 'cover'); 16 shouldBeEqualToString("e.style.backgroundSize", 'cover');
17 debug("") 17 debug("")
18 18
19 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(false) ; 19 window.internals.settings.setUseLegacyBackgroundSizeShorthandBehavior(false) ;
20 } 20 }
21 21
22 </script> 22 </script>
23 </body> 23 </body>
24 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698