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

Side by Side Diff: LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js

Issue 14619018: As discussed in blink-dev mailing list remove getPropertyShorthand and isImplicit from the Web expo… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 description('This layout test used to test that correct shorthand name ' +
2 'is returned for background-repeat-x, ' +
3 'background-repeat-y, background-position-x, background-position-y, ' +
4 '-webkit-mask-repeat-x,-webkit-mask-repeat-y, -webkit-mask-position- x, ' +
5 '-webkit-mask-position-y when corresponding shorthand is used in the style ' +
6 'declaration. It tests regression described in ' +
7 '<a href="https://bugs.webkit.org/show_bug.cgi?id=28972">this bug</a >.' +
8 ' Now that access to non author stylesheet is blocked, we should ins tead' +
9 ' get null when accessing the css rules on that object.');
10
11 function getShorthand(longhand, iconId)
12 {
13 var iconDiv = document.getElementById(iconId);
14 var rules = window.getMatchedCSSRules(iconDiv,'',false);
15 return rules[1] ? rules[1].style.getPropertyShorthand(longhand) : 'null';
16 }
17
18 shouldBe('getShorthand("background-repeat-x", "icon1")', '"null"');
19 shouldBe('getShorthand("background-repeat-y", "icon1")', '"null"');
20 shouldBe('getShorthand("background-repeat", "icon1")', '"null"');
21
22 shouldBe('getShorthand("background-position-x", "icon1")', '"null"');
23 shouldBe('getShorthand("background-position-y", "icon1")', '"null"');
24 shouldBe('getShorthand("background-position", "icon1")', '"null"');
25
26 shouldBe('getShorthand("-webkit-mask-repeat-x", "icon1")', '"null"');
27 shouldBe('getShorthand("-webkit-mask-repeat-y", "icon1")', '"null"');
28 shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"');
29
30 shouldBe('getShorthand("-webkit-mask-position-x", "icon1")', '"null"');
31 shouldBe('getShorthand("-webkit-mask-position-y", "icon1")', '"null"');
32 shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"');
33
34
35 shouldBe('getShorthand("background-repeat-x", "icon2")', '"null"');
36 shouldBe('getShorthand("background-repeat-y", "icon2")', '"null"');
37 shouldBe('getShorthand("background-repeat", "icon2")', '"null"');
38
39 shouldBe('getShorthand("background-position-x", "icon2")', '"null"');
40 shouldBe('getShorthand("background-position-y", "icon2")', '"null"');
41 shouldBe('getShorthand("background-position", "icon2")', '"null"');
42
43 shouldBe('getShorthand("-webkit-mask-repeat-x", "icon2")', '"null"');
44 shouldBe('getShorthand("-webkit-mask-repeat-y", "icon2")', '"null"');
45 shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"');
46
47 shouldBe('getShorthand("-webkit-mask-position-x", "icon2")', '"null"');
48 shouldBe('getShorthand("-webkit-mask-position-y", "icon2")', '"null"');
49 shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698