Changeset 95595 in webkit


Ignore:
Timestamp:
Sep 20, 2011 8:37:05 PM (13 years ago)
Author:
abarth@webkit.org
Message:

garden-o-matic unit test fail because Safari 5.1 doesn't enumerate dictionaries in the same order as V8
https://bugs.webkit.org/show_bug.cgi?id=68496

Reviewed by Dimitri Glazkov.

This patch adds a bunch of sorting to make sure things happen in a
predictable order in both JavaScriptCore and V8. We've talked before
about whether these two JavaScript engines should enumerate
dictionaries in the same order, but the consensus has been that they
shouldn't. Personally, I disagree with that consensus, but such is life.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js:
Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js

    r95592 r95595  
    331331            return;
    332332
    333         Object.keys(this._items).forEach(function(key) {
     333        Object.keys(this._items).sort().forEach(function(key) {
    334334            var item = this._items[key];
    335335            callback.call(thisObject || item, item, key, !!this._updated[key]);
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js

    r94487 r95595  
    320320    dict.update("three");
    321321    dict.purge();
    322     deepEqual(dumpKeys(), ["one", "two", "three"]);
     322    deepEqual(dumpKeys(), ["one", "three", "two"]);
    323323    dict.update("two");
    324324    dict.purge(function() {
     
    346346});
    347347
    348 test("extends", 17, function() {
     348test("extends", 14, function() {
    349349
    350350    var LikeDiv = base.extends("div", {
     
    405405    document.body.appendChild(new LikeProgress());
    406406    equals(document.body.lastChild.tagName, "PROGRESS");
    407     equals(document.body.lastChild.position, 0.1);
     407    // Safari 5.1 lacks the <progress> element.
     408    // equals(document.body.lastChild.position, 0.1);
    408409    equals(document.body.lastChild.innerHTML, "");
    409410    raises(function() {
     
    414415    document.body.appendChild(new LikeLikeProgress());
    415416    equals(document.body.lastChild.tagName, "PROGRESS");
    416     equals(document.body.lastChild.position, 0.1);
     417    // Safari 5.1 lacks the <progress> element.
     418    // equals(document.body.lastChild.position, 0.1);
    417419    document.body.lastChild.completed();
    418     equals(document.body.lastChild.position, 1);
     420    // Safari 5.1 lacks the <progress> element.
     421    // equals(document.body.lastChild.position, 1);
    419422    document.body.removeChild(document.body.lastChild);
    420423});
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js

    r95068 r95595  
    3535    var configuration;
    3636    configuration = new ui.failures.Configuration({});
    37     deepEqual(Object.getOwnPropertyNames(configuration.__proto__), ['init', 'equals', '_addSpan']);
     37    deepEqual(Object.getOwnPropertyNames(configuration.__proto__).sort(), [
     38        '_addSpan',
     39        'equals',
     40        'init',
     41    ]);
    3842    equal(configuration.outerHTML, '<a target="_blank"></a>');
    3943    configuration = new ui.failures.Configuration({is64bit: true, version: 'lucid'});
     
    4953test('FailureGrid', 9, function() {
    5054    var grid = new ui.failures.FailureGrid();
    51     deepEqual(Object.getOwnPropertyNames(grid.__proto__), ["init", "_rowByResult", "add", "removeResultRows"]);
     55    deepEqual(Object.getOwnPropertyNames(grid.__proto__).sort(), [
     56        "_rowByResult",
     57        "add",
     58        "init",
     59        "removeResultRows",
     60    ]);
    5261    equal(grid.outerHTML, '<table class="failures">' +
    5362        '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' +
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js

    r95066 r95595  
    106106    equal(time.tagName, 'TIME');
    107107    equal(time.className, 'relative');
    108     deepEqual(Object.getOwnPropertyNames(time.__proto__), ['init', 'date', 'setDate', 'update']);
     108    deepEqual(Object.getOwnPropertyNames(time.__proto__).sort(), [
     109        'date',
     110        'init',
     111        'setDate',
     112        'update',
     113    ]);
    109114    equal(time.outerHTML, '<time class="relative">Just now</time>');
    110115    var tenMinutesAgo = new Date();
  • trunk/Tools/ChangeLog

    r95592 r95595  
     12011-09-20  Adam Barth  <abarth@webkit.org>
     2
     3        garden-o-matic unit test fail because Safari 5.1 doesn't enumerate dictionaries in the same order as V8
     4        https://bugs.webkit.org/show_bug.cgi?id=68496
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        This patch adds a bunch of sorting to make sure things happen in a
     9        predictable order in both JavaScriptCore and V8.  We've talked before
     10        about whether these two JavaScript engines should enumerate
     11        dictionaries in the same order, but the consensus has been that they
     12        shouldn't.  Personally, I disagree with that consensus, but such is life.
     13
     14        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
     15        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:
     16        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/failures_unittests.js:
     17        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js:
     18
    1192011-09-20  Adam Barth  <abarth@webkit.org>
    220
Note: See TracChangeset for help on using the changeset viewer.