Changeset 94722 in webkit


Ignore:
Timestamp:
Sep 7, 2011 4:08:18 PM (13 years ago)
Author:
abarth@webkit.org
Message:

rebaseline button in garden-o-matic details view should work
https://bugs.webkit.org/show_bug.cgi?id=67738

Reviewed by Dimitri Glazkov.

This patch wires up the rebaseline button in garden-o-matic results
details view. The button is current per-test, so there isn't a way to
rebaseline individual bots. This is a place to start. If we decide we
want per-bot rebaselining, we'll need to think of some better UI.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/results.css:
Location:
trunk/Tools
Files:
6 edited

Legend:

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

    r94631 r94722  
    3737        $(this._view).bind('next', this.onNext.bind(this));
    3838        $(this._view).bind('previous', this.onPrevious.bind(this));
     39        $(this._view).bind('rebaseline', this.onRebaseline.bind(this));
    3940    },
    4041    onNext: function()
     
    4546    {
    4647        this._view.previousResult();
     48    },
     49    onRebaseline: function()
     50    {
     51        var testName = this._view.currentTestName();
     52        var failureInfoList = Object.keys(this._resultsByTest[testName]).map(function(builderName) {
     53            return {
     54                'testName': testName,
     55                'builderName': builderName
     56            }
     57        });
     58        checkout.rebaseline(failureInfoList, function() {
     59            // FIXME: We should have a better dialog than this!
     60            alert('Rebaseline done! Please land with "webkit-patch land-cowboy".');
     61        });
    4762    }
    4863});
     
    104119    onRebaseline: function(failures)
    105120    {
    106         failureInfoList = base.flattenArray(failures.testNameList().map(model.unexpectedFailureInfoForTestName));
     121        var failureInfoList = base.flattenArray(failures.testNameList().map(model.unexpectedFailureInfoForTestName));
    107122        checkout.rebaseline(failureInfoList, function() {
    108123            // FIXME: We should have a better dialog than this!
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions.js

    r94312 r94722  
    3333        this._eventName = null;
    3434        $(this).addClass('action');
    35         this.addEventListener('click', function() {
    36             if (this._eventName)
     35        this.addEventListener('click', function(event) {
     36            if (this._eventName) {
    3737                $(this).trigger(this._eventName);
     38                event.stopPropagation();
     39            }
    3840        }.bind(this));
    3941    },
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js

    r94631 r94722  
    156156            $(this).empty().append(
    157157                new ui.actions.List([
    158                     new ui.actions.Rebaseline().makeDefault(),
    159158                    new ui.actions.Previous(),
    160159                    new ui.actions.Next()
     
    174173            var link = document.createElement('a');
    175174            $(link).attr('href', '#').text(testName);
    176             this.appendChild(document.createElement('h3')).appendChild(link);
     175
     176            var header = document.createElement('h3');
     177            $(header).append(new ui.actions.List([
     178                new ui.actions.Rebaseline().makeDefault()
     179            ])).append(link);
     180            this.appendChild(header);
    177181            this.appendChild(this._delegate.contentForTest(testName));
    178182            ++this._length; // There doesn't seem to be any good way to get this information from accordion.
     
    225229        $(this).accordion('option', 'active', 0);
    226230        $('.builder-selector', this)[0].firstResult();
     231    },
     232    currentTestName: function()
     233    {
     234        var currentIndex = $(this).accordion('option', 'active');
     235        return $('h3 a', this)[currentIndex].textContent;
    227236    }
    228237});
     
    330339    {
    331340        this._testSelector.firstResult()
     341    },
     342    currentTestName: function()
     343    {
     344        return this._testSelector.currentTestName()
    332345    }
    333346});
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js

    r94631 r94722  
    4747}
    4848
    49 test('View', 6, function() {
     49test('View', 8, function() {
    5050    var delegate = {
    5151        fetchResultsURLs: function(failureInfo, callback) { return;}
     
    5959    equals($('.test-selector', view).accordion('option', 'active'), 0);
    6060    equals($($('.builder-selector', view)[0]).tabs('option', 'selected'), 1);
     61    equals(view.currentTestName(), 'scrollbars/custom-scrollbar-with-incomplete-style.html');
    6162    view.nextResult();
    6263    equals($('.test-selector', view).accordion('option', 'active'), 1);
    6364    equals($($('.builder-selector', view)[1]).tabs('option', 'selected'), 0);
     65    equals(view.currentTestName(), 'userscripts/another-test.html');
    6466    view.previousResult();
    6567    equals($('.test-selector', view).accordion('option', 'active'), 0);
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/results.css

    r94631 r94722  
    3636}
    3737
     38.results-view h3 ul.actions {
     39    padding: 2px 0px;
     40}
     41
     42.results-view h3 ul.actions {
     43    visibility: hidden;
     44}
     45
     46.results-view h3.ui-state-active ul.actions {
     47    visibility: visible;
     48}
     49
    3850.ui-tabs .ui-tabs-panel.results-detail {
    3951    padding: 0px;
  • trunk/Tools/ChangeLog

    r94718 r94722  
     12011-09-07  Adam Barth  <abarth@webkit.org>
     2
     3        rebaseline button in garden-o-matic details view should work
     4        https://bugs.webkit.org/show_bug.cgi?id=67738
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        This patch wires up the rebaseline button in garden-o-matic results
     9        details view.  The button is current per-test, so there isn't a way to
     10        rebaseline individual bots.  This is a place to start.  If we decide we
     11        want per-bot rebaselining, we'll need to think of some better UI.
     12
     13        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
     14        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions.js:
     15        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
     16        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/results.css:
     17
    1182011-09-07  Eric Seidel  <eric@webkit.org>
    219
Note: See TracChangeset for help on using the changeset viewer.