Changeset 93241 in webkit


Ignore:
Timestamp:
Aug 17, 2011 2:13:29 PM (13 years ago)
Author:
Dimitri Glazkov
Message:

Wire up relative time to garden-o-matic summary view.
https://bugs.webkit.org/show_bug.cgi?id=66343

Reviewed by Adam Barth.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js: Add time to the commitData object.
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model_unittests.js: Adjusted unit tests.
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js: Wired up relative date.
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js: Updated unit tests.
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/trac_unittests.js: Adjusted unit tests.
Location:
trunk/Tools
Files:
6 edited

Legend:

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

    r93224 r93241  
    9292        var title = item.getElementsByTagName('title')[0].textContent;
    9393        var author = item.getElementsByTagName('author')[0].textContent;
     94        var time = item.getElementsByTagName('pubDate')[0].textContent;
    9495
    9596        // FIXME: This isn't a very high-fidelity reproduction of the commit message,
     
    102103            'revision': findRevision(title),
    103104            'title': title,
     105            'time': time,
    104106            'summary': findSummary(message),
    105107            'author': findAuthor(message) || author,
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model_unittests.js

    r93063 r93241  
    159159                "revision": 92259,
    160160                "title": "Revision 92259: Unreviewed, rolling out r92256.\nhttp://trac.webkit.org/changeset/92256 ...",
     161                "time": "Wed, 03 Aug 2011 04:26:52 GMT",
    161162                "summary": "Unreviewed, rolling out r92256.",
    162163                "author": "Sheriff Bot",
     
    167168                "revision": 92256,
    168169                "title": "Revision 92256: Support cast between CSSPrimitiveValue and EBoxSizing, use in ...",
     170                "time": "Thu, 04 Aug 2011 02:09:19 GMT",
    169171                "summary": "Support cast between CSSPrimitiveValue and EBoxSizing, use in CSSStyleSelector.",
    170172                "author": "macpherson@chromium.org",
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js

    r93163 r93241  
    3636    push: function(notification)
    3737    {
     38        // FIXME: Add in descending time order.
    3839        this.insertBefore(notification, this.firstChild);
    3940        return notification;
     
    6869    init: function()
    6970    {
    70         this.updateTime(new Date());
     71        this.date = new Date();
    7172    },
    72     updateTime: function(time)
     73    date: function()
    7374    {
    74         this.textContent = base.relativizeTime(time);
     75        return this._date;
     76    },
     77    setDate: function(date)
     78    {
     79        this._date = date;
     80        this.textContent = base.relativizeTime(date);
    7581    }
    7682});
     
    134140        if (this.containsFailureAnalysis(failureAnalysis))
    135141            return;
    136         // FIXME: Retrieve date from failureAnalysis and set this._time.
    137         // FIXME: Add in order by time.
    138142        return this._tests.appendChild(new ui.notifications.FailingTest(failureAnalysis));
    139143    },
    140144    addCommitData: function(commitData)
    141145    {
     146        var commitDataDate = new Date(commitData.time);
     147        if (this._time.date > commitDataDate);
     148            this._time.date = commitDataDate;
    142149        return this._causes.appendChild(new ui.notifications.SuspiciousCommit(commitData));
    143150    }
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js

    r93163 r93241  
    7171    testFailures.addFailureAnalysis({testName: 'test'});
    7272    equal(testFailures.innerHTML, '<time>Just now</time><div class="what"><div class="problem"><ul class="effects"><li>test</li></ul><ul class="causes"></ul></div></div>');
    73     testFailures.addCommitData({revision: 1, title: "title", author: "author", reviewer: "reviewer"});
    74     equal(testFailures.innerHTML, '<time>Just now</time><div class="what"><div class="problem"><ul class="effects"><li>test</li></ul><ul class="causes"><li><div class="description"><a href="">1</a>title author (reviewer)</div><ul class="actions"><li><button>Roll out</button></li></ul></li></ul></div></div>');
     73    var time = new Date();
     74    time.setMinutes(time.getMinutes() - 10);
     75    testFailures.addCommitData({revision: 1, time: time, title: "title", author: "author", reviewer: "reviewer"});
     76    equal(testFailures.innerHTML, '<time>10 minutes ago</time><div class="what"><div class="problem"><ul class="effects"><li>test</li></ul><ul class="causes"><li><div class="description"><a href="">1</a>title author (reviewer)</div><ul class="actions"><li><button>Roll out</button></li></ul></li></ul></div></div>');
    7577});
    7678
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/trac_unittests.js

    r93224 r93241  
    242242    "revision": 92342,
    243243    "title": "Revision 92342: Support cast between CSSPrimitiveValue and EBoxSizing, use in ...",
     244    "time": "Thu, 04 Aug 2011 02:09:19 GMT",
    244245    "summary": "Support cast between CSSPrimitiveValue and EBoxSizing, use in CSSStyleSelector.",
    245246    "author": "macpherson@chromium.org",
     
    250251    "revision": 92341,
    251252    "title": "Revision 92341: Implement EventSender.scalePageBy() ...",
     253    "time": "Thu, 04 Aug 2011 02:01:31 GMT",
    252254    "summary": "Implement EventSender.scalePageBy()",
    253255    "author": "Kentaro Hara",
     
    258260    "revision": 92338,
    259261    "title": "Revision 92338: Revert an erroneous rebaseline from r92315.\n* ...",
     262    "time": "Thu, 04 Aug 2011 01:41:29 GMT",
    260263    "summary": "Revert an erroneous rebaseline from r92315.",
    261264    "author": "rniwa@webkit.org",
     
    266269    "revision": 92337,
    267270    "title": "Revision 92337: [Qt][Texmap][REGRESSION] http://webkit.org/blog-files/transform-style.html ...",
     271    "time": "Thu, 04 Aug 2011 00:22:21 GMT",
    268272    "summary": "[Qt][Texmap][REGRESSION]  http://webkit.org/blog-files/transform-style.html doesn't show composited content",
    269273    "author": "noam.rosenthal@nokia.com",
     
    274278    "revision": 92259,
    275279    "title": "Revision 92259: Unreviewed, rolling out r92256.\nhttp://trac.webkit.org/changeset/92256 ...",
     280    "time": "Wed, 03 Aug 2011 04:26:52 GMT",
    276281    "summary": "Unreviewed, rolling out r92256.",
    277282    "author": "Sheriff Bot",
  • trunk/Tools/ChangeLog

    r93240 r93241  
     12011-08-16  Dimitri Glazkov  <dglazkov@chromium.org>
     2
     3        Wire up relative time to garden-o-matic summary view.
     4        https://bugs.webkit.org/show_bug.cgi?id=66343
     5
     6        Reviewed by Adam Barth.
     7
     8        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Trac.js: Add time to the commitData object.
     9        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model_unittests.js: Adjusted unit tests.
     10        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications.js: Wired up relative date.
     11        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js: Updated unit tests.
     12        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/trac_unittests.js: Adjusted unit tests.
     13
    1142011-08-17  Adam Roben  <aroben@apple.com>
    215
Note: See TracChangeset for help on using the changeset viewer.