Changeset 35250 in webkit


Ignore:
Timestamp:
Jul 19, 2008 10:29:44 PM (16 years ago)
Author:
oliver@apple.com
Message:

Bug 20104: Exception in tables/mozilla_expected_failures/bugs/bug92868_1.html includes the equals operator in the quoted expression
<https://bugs.webkit.org/show_bug.cgi?id=20104>

Reviewed by Cameron Zwarich

To make this correct we make the dot and bracket assign nodes emit the information to indicate
the failure range is the dot/bracket accessor.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r35247 r35250  
     12008-07-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Bug 20104: Exception in tables/mozilla_expected_failures/bugs/bug92868_1.html includes the equals operator in the quoted expression
     6        <https://bugs.webkit.org/show_bug.cgi?id=20104>
     7
     8        To make this correct we make the dot and bracket assign nodes emit the information to indicate
     9        the failure range is the dot/bracket accessor.
     10
     11        * kjs/grammar.y:
     12
    1132008-07-18  Steve Falkenburg  <sfalken@apple.com>
    214
  • trunk/JavaScriptCore/kjs/grammar.y

    r35245 r35250  
    12121212        BracketAccessorNode* bracket = static_cast<BracketAccessorNode*>(loc);
    12131213        if (op == OpEqual)
    1214             return new AssignBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript(), expr, locHasAssignments, exprHasAssignments, divot, divot - start, end - divot);
     1214            return new AssignBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript(), expr, locHasAssignments, exprHasAssignments, bracket->divot(), bracket->divot() - start, end - bracket->divot());
    12151215        else {
    12161216            ReadModifyBracketNode* node = new ReadModifyBracketNode(GLOBAL_DATA, bracket->base(), bracket->subscript(), op, expr, locHasAssignments, exprHasAssignments, divot, divot - start, end - divot);
     
    12221222    DotAccessorNode* dot = static_cast<DotAccessorNode*>(loc);
    12231223    if (op == OpEqual)
    1224         return new AssignDotNode(GLOBAL_DATA, dot->base(), dot->identifier(), expr, exprHasAssignments, divot, divot - start, end - divot);
     1224        return new AssignDotNode(GLOBAL_DATA, dot->base(), dot->identifier(), expr, exprHasAssignments, dot->divot(), dot->divot() - start, end - dot->divot());
    12251225
    12261226    ReadModifyDotNode* node = new ReadModifyDotNode(GLOBAL_DATA, dot->base(), dot->identifier(), op, expr, exprHasAssignments, divot, divot - start, end - divot);
  • trunk/LayoutTests/ChangeLog

    r35245 r35250  
     12008-07-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Update a few tests i filed to correct in the last patch, and add tests for
     6        assignment error position.
     7
     8        * fast/css/font-face-descriptor-multiple-values-parsing-expected.txt:
     9        * fast/js/resources/exception-expression-offset.js:
     10        * http/tests/security/cross-frame-access-call-expected.txt:
     11        * http/tests/security/cross-frame-access-call.html:
     12        * platform/mac/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
     13
    1142008-07-18  Oliver Hunt  <oliver@apple.com>
    215
  • trunk/LayoutTests/fast/css/font-face-descriptor-multiple-values-parsing-expected.txt

    r34879 r35250  
    99PASS test("font-weight", "bold, normal") is "bold, normal"
    1010PASS test("font-weight", "100, 200, 300, 400, 500, 600, 700, 100") is "100, 200, 300, 400, 500, 600, 700, 100"
    11 PASS test("font-weight", "all, 100") threw exception TypeError: Null value.
    12 PASS test("font-weight", "bold, normal, all") threw exception TypeError: Null value.
    13 PASS test("font-weight", "") threw exception TypeError: Null value.
     11PASS test("font-weight", "all, 100") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
     12PASS test("font-weight", "bold, normal, all") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
     13PASS test("font-weight", "") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
    1414PASS test("font-style", "normal") is "normal"
    1515PASS test("font-style", "italic") is "italic"
    1616PASS test("font-style", "normal, oblique") is "normal, oblique"
    1717PASS test("font-style", "all") is "all"
    18 PASS test("font-style", "all, normal") threw exception TypeError: Null value.
    19 PASS test("font-style", "italic, all") threw exception TypeError: Null value.
    20 PASS test("font-style", "") threw exception TypeError: Null value.
     18PASS test("font-style", "all, normal") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
     19PASS test("font-style", "italic, all") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
     20PASS test("font-style", "") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
    2121PASS test("font-variant", "normal") is "normal"
    2222PASS test("font-variant", "small-caps") is "small-caps"
    2323PASS test("font-variant", "normal, small-caps") is "normal, small-caps"
    2424PASS test("font-variant", "all") is "all"
    25 PASS test("font-variant", "all, normal") threw exception TypeError: Null value.
    26 PASS test("font-variant", "small-caps, all") threw exception TypeError: Null value.
    27 PASS test("font-variant", "") threw exception TypeError: Null value.
     25PASS test("font-variant", "all, normal") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
     26PASS test("font-variant", "small-caps, all") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
     27PASS test("font-variant", "") threw exception TypeError: Result of expression 'style.sheet.rules[0].style.getPropertyCSSValue(property)' [null] is not an object..
    2828PASS successfullyParsed is true
    2929
  • trunk/LayoutTests/fast/js/resources/exception-expression-offset.js

    r35245 r35250  
    3535testException("for (undefined.b in [1]) {}", 5, 14, 16, "Result of expression 'undefined' [undefined] is not an object.");
    3636testException("for (undefined[0] in [1]) {}", 5, 14, 17, "Result of expression 'undefined' [undefined] is not an object.");
     37testException("undefined.a = 5", 0, 9, 15, "Result of expression 'undefined' [undefined] is not an object.");
     38testException("undefined[0] = 5", 0, 9, 16, "Result of expression 'undefined' [undefined] is not an object.");
     39testException("({b:undefined}).b.a = 5", 0, 17, 23, "Result of expression '({b:undefined}).b' [undefined] is not an object.");
     40testException("({b:undefined}).b[0] = 5", 0, 17, 24, "Result of expression '({b:undefined}).b' [undefined] is not an object.");
     41testException("undefined.a += 5", 0, 9, 11, "Result of expression 'undefined' [undefined] is not an object.");
     42testException("undefined[0] += 5", 0, 9, 12, "Result of expression 'undefined' [undefined] is not an object.");
     43testException("({b:undefined}).b.a += 5", 0, 17, 19, "Result of expression '({b:undefined}).b' [undefined] is not an object.");
     44testException("({b:undefined}).b[0] += 5", 0, 17, 20, "Result of expression '({b:undefined}).b' [undefined] is not an object.");
    3745
    3846var successfullyParsed = true;
  • trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt

    r34142 r35250  
    8383PASS: window.resizeBy.call(targetWindow, 0, 0); should be 'undefined' and is.
    8484PASS: window.resizeTo.call(targetWindow, 0, 0); should be 'undefined' and is.
    85 PASS: window.showModalDialog.call(targetWindow); should be 'TypeError: Undefined value' and is.
     85PASS: window.showModalDialog.call(targetWindow); should be 'TypeError: Result of expression 'window.showModalDialog' [undefined] is not an object.' and is.
    8686PASS: window.location.toString.call(targetWindow.location) should be 'undefined' and is.
    8787
  • trunk/LayoutTests/http/tests/security/cross-frame-access-call.html

    r35245 r35250  
    5757
    5858    // Throws a TypeError and logs to the error console
    59     shouldBe("window.showModalDialog.call(targetWindow);", "'Result of expression 'window.showModalDialog' [undefined] is not an object.'");
     59    shouldBe("window.showModalDialog.call(targetWindow);", '"TypeError: Result of expression \'window.showModalDialog\' [undefined] is not an object."');
    6060
    6161    // - Tests for the Location object -
  • trunk/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt

    r35245 r35250  
    1 CONSOLE MESSAGE: line 14: Result of expression 'document.styleSheets[1].disabled =' [undefined] is not an object.
     1CONSOLE MESSAGE: line 14: Result of expression 'document.styleSheets[1]' [undefined] is not an object.
    22layer at (0,0) size 800x600
    33  RenderView at (0,0) size 800x600
Note: See TracChangeset for help on using the changeset viewer.