Changeset 70363 in webkit


Ignore:
Timestamp:
Oct 22, 2010 4:18:40 PM (14 years ago)
Author:
inferno@chromium.org
Message:

2010-10-22 Abhishek Arya <inferno@chromium.org>

Reviewed by Dimitri Glazkov.

Fix failing tests on chromium.
https://bugs.webkit.org/show_bug.cgi?id=48160

  • fast/backgrounds/repeat/background-repeat-shorthand-expected.txt:
  • fast/backgrounds/repeat/margin-shorthand-expected.txt:
  • fast/backgrounds/repeat/resources/background-repeat-shorthand.js: (getShorthand):
  • fast/backgrounds/repeat/resources/margin-shorthand.js: (iconMarginValue):
  • fast/css/modify-ua-rules-from-javascript.html:
Location:
trunk/LayoutTests
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r70360 r70363  
     12010-10-22  Abhishek Arya  <inferno@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Fix failing tests on chromium.
     6        https://bugs.webkit.org/show_bug.cgi?id=48160
     7
     8        * fast/backgrounds/repeat/background-repeat-shorthand-expected.txt:
     9        * fast/backgrounds/repeat/margin-shorthand-expected.txt:
     10        * fast/backgrounds/repeat/resources/background-repeat-shorthand.js:
     11        (getShorthand):
     12        * fast/backgrounds/repeat/resources/margin-shorthand.js:
     13        (iconMarginValue):
     14        * fast/css/modify-ua-rules-from-javascript.html:
     15
    1162010-10-22  Dimitri Glazkov  <dglazkov@chromium.org>
    217
  • trunk/LayoutTests/fast/backgrounds/repeat/background-repeat-shorthand-expected.txt

    r70335 r70363  
    44
    55
    6 PASS getShorthand("background-repeat-x", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    7 PASS getShorthand("background-repeat-y", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    8 PASS getShorthand("background-repeat", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    9 PASS getShorthand("background-position-x", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    10 PASS getShorthand("background-position-y", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    11 PASS getShorthand("background-position", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    12 PASS getShorthand("-webkit-mask-repeat-x", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    13 PASS getShorthand("-webkit-mask-repeat-y", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    14 PASS getShorthand("-webkit-mask-repeat", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    15 PASS getShorthand("-webkit-mask-position-x", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    16 PASS getShorthand("-webkit-mask-position-y", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    17 PASS getShorthand("-webkit-mask-repeat", "icon1") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    18 PASS getShorthand("background-repeat-x", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    19 PASS getShorthand("background-repeat-y", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    20 PASS getShorthand("background-repeat", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    21 PASS getShorthand("background-position-x", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    22 PASS getShorthand("background-position-y", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    23 PASS getShorthand("background-position", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    24 PASS getShorthand("-webkit-mask-repeat-x", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    25 PASS getShorthand("-webkit-mask-repeat-y", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    26 PASS getShorthand("-webkit-mask-repeat", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    27 PASS getShorthand("-webkit-mask-position-x", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    28 PASS getShorthand("-webkit-mask-position-y", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
    29 PASS getShorthand("-webkit-mask-repeat", "icon2") threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
     6PASS getShorthand("background-repeat-x", "icon1") is "null"
     7PASS getShorthand("background-repeat-y", "icon1") is "null"
     8PASS getShorthand("background-repeat", "icon1") is "null"
     9PASS getShorthand("background-position-x", "icon1") is "null"
     10PASS getShorthand("background-position-y", "icon1") is "null"
     11PASS getShorthand("background-position", "icon1") is "null"
     12PASS getShorthand("-webkit-mask-repeat-x", "icon1") is "null"
     13PASS getShorthand("-webkit-mask-repeat-y", "icon1") is "null"
     14PASS getShorthand("-webkit-mask-repeat", "icon1") is "null"
     15PASS getShorthand("-webkit-mask-position-x", "icon1") is "null"
     16PASS getShorthand("-webkit-mask-position-y", "icon1") is "null"
     17PASS getShorthand("-webkit-mask-repeat", "icon1") is "null"
     18PASS getShorthand("background-repeat-x", "icon2") is "null"
     19PASS getShorthand("background-repeat-y", "icon2") is "null"
     20PASS getShorthand("background-repeat", "icon2") is "null"
     21PASS getShorthand("background-position-x", "icon2") is "null"
     22PASS getShorthand("background-position-y", "icon2") is "null"
     23PASS getShorthand("background-position", "icon2") is "null"
     24PASS getShorthand("-webkit-mask-repeat-x", "icon2") is "null"
     25PASS getShorthand("-webkit-mask-repeat-y", "icon2") is "null"
     26PASS getShorthand("-webkit-mask-repeat", "icon2") is "null"
     27PASS getShorthand("-webkit-mask-position-x", "icon2") is "null"
     28PASS getShorthand("-webkit-mask-position-y", "icon2") is "null"
     29PASS getShorthand("-webkit-mask-repeat", "icon2") is "null"
    3030PASS successfullyParsed is true
    3131
  • trunk/LayoutTests/fast/backgrounds/repeat/margin-shorthand-expected.txt

    r70335 r70363  
    44
    55
    6 PASS iconMarginValue() threw exception TypeError: Result of expression 'rules[1]' [undefined] is not an object..
     6PASS iconMarginValue() is "null"
    77PASS successfullyParsed is true
    88
  • trunk/LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js

    r70335 r70363  
    1313    var iconDiv = document.getElementById(iconId);
    1414    var rules = window.getMatchedCSSRules(iconDiv,'',false);
    15     return rules[1].style.getPropertyShorthand(longhand);
     15    return rules[1] ? rules[1].style.getPropertyShorthand(longhand) : 'null';
    1616}
    1717
    18 shouldThrow('getShorthand("background-repeat-x", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    19 shouldThrow('getShorthand("background-repeat-y", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    20 shouldThrow('getShorthand("background-repeat", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     18shouldBe('getShorthand("background-repeat-x", "icon1")', '"null"');
     19shouldBe('getShorthand("background-repeat-y", "icon1")', '"null"');
     20shouldBe('getShorthand("background-repeat", "icon1")', '"null"');
    2121
    22 shouldThrow('getShorthand("background-position-x", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    23 shouldThrow('getShorthand("background-position-y", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    24 shouldThrow('getShorthand("background-position", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     22shouldBe('getShorthand("background-position-x", "icon1")', '"null"');
     23shouldBe('getShorthand("background-position-y", "icon1")', '"null"');
     24shouldBe('getShorthand("background-position", "icon1")', '"null"');
    2525
    26 shouldThrow('getShorthand("-webkit-mask-repeat-x", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    27 shouldThrow('getShorthand("-webkit-mask-repeat-y", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    28 shouldThrow('getShorthand("-webkit-mask-repeat", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     26shouldBe('getShorthand("-webkit-mask-repeat-x", "icon1")', '"null"');
     27shouldBe('getShorthand("-webkit-mask-repeat-y", "icon1")', '"null"');
     28shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"');
    2929
    30 shouldThrow('getShorthand("-webkit-mask-position-x", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    31 shouldThrow('getShorthand("-webkit-mask-position-y", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    32 shouldThrow('getShorthand("-webkit-mask-repeat", "icon1")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     30shouldBe('getShorthand("-webkit-mask-position-x", "icon1")', '"null"');
     31shouldBe('getShorthand("-webkit-mask-position-y", "icon1")', '"null"');
     32shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"');
    3333
    3434
    35 shouldThrow('getShorthand("background-repeat-x", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    36 shouldThrow('getShorthand("background-repeat-y", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    37 shouldThrow('getShorthand("background-repeat", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     35shouldBe('getShorthand("background-repeat-x", "icon2")', '"null"');
     36shouldBe('getShorthand("background-repeat-y", "icon2")', '"null"');
     37shouldBe('getShorthand("background-repeat", "icon2")', '"null"');
    3838
    39 shouldThrow('getShorthand("background-position-x", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    40 shouldThrow('getShorthand("background-position-y", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    41 shouldThrow('getShorthand("background-position", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     39shouldBe('getShorthand("background-position-x", "icon2")', '"null"');
     40shouldBe('getShorthand("background-position-y", "icon2")', '"null"');
     41shouldBe('getShorthand("background-position", "icon2")', '"null"');
    4242
    43 shouldThrow('getShorthand("-webkit-mask-repeat-x", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    44 shouldThrow('getShorthand("-webkit-mask-repeat-y", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    45 shouldThrow('getShorthand("-webkit-mask-repeat", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     43shouldBe('getShorthand("-webkit-mask-repeat-x", "icon2")', '"null"');
     44shouldBe('getShorthand("-webkit-mask-repeat-y", "icon2")', '"null"');
     45shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"');
    4646
    47 shouldThrow('getShorthand("-webkit-mask-position-x", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    48 shouldThrow('getShorthand("-webkit-mask-position-y", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
    49 shouldThrow('getShorthand("-webkit-mask-repeat", "icon2")', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     47shouldBe('getShorthand("-webkit-mask-position-x", "icon2")', '"null"');
     48shouldBe('getShorthand("-webkit-mask-position-y", "icon2")', '"null"');
     49shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"');
    5050
    5151
  • trunk/LayoutTests/fast/backgrounds/repeat/resources/margin-shorthand.js

    r70335 r70363  
    1111    var iconDiv = document.getElementById('icon');
    1212    var rules = window.getMatchedCSSRules(iconDiv,'',false);
    13     return rules[1].style.getPropertyValue('margin');
     13    return rules[1] ? rules[1].style.getPropertyValue('margin') : 'null';
    1414}
    1515
    16 shouldThrow('iconMarginValue()', '"TypeError: Result of expression \'rules[1]\' [undefined] is not an object."');
     16shouldBe('iconMarginValue()', '"null"');
    1717
    1818var successfullyParsed = true;
  • trunk/LayoutTests/fast/css/modify-ua-rules-from-javascript.html

    r70335 r70363  
    99function test()
    1010{
    11     var styleToChange = window.getMatchedCSSRules(document.body, "", false)[0].style;
    12     var originalMarginTop = styleToChange.marginTop;
    13     styleToChange.marginTop = "200px";
    14     styleToChange.marginTop = originalMarginTop;
    15 
    16     document.getElementById("result").innerHTML = "FAIL";
     11    var cssRulesList = window.getMatchedCSSRules(document.body, "", false)[0];
     12    if (cssRulesList)
     13    {
     14        var styleToChange = cssRulesList.style;
     15        var originalMarginTop = styleToChange.marginTop;
     16        styleToChange.marginTop = "200px";
     17        styleToChange.marginTop = originalMarginTop;
     18        document.getElementById("result").innerHTML = "FAIL";
     19    }
    1720}
    1821</script>
Note: See TracChangeset for help on using the changeset viewer.