| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 module('ui.failures'); | 28 module('ui.failures'); |
| 29 | 29 |
| 30 test('Builder', 6, function() { | 30 test('Builder', 6, function() { |
| 31 var configuration; | 31 var configuration; |
| 32 configuration = new ui.failures.Builder("WebKit Linux", ["update", "webkit_t
ests"]); | 32 configuration = new ui.failures.Builder("WebKit Linux", ["update", "webkit_t
ests"]); |
| 33 deepEqual(Object.getOwnPropertyNames(configuration.__proto__).sort(), [ | 33 deepEqual(Object.getOwnPropertyNames(configuration.__proto__).sort(), [ |
| 34 '_addSpan', | 34 '_addSpan', |
| 35 'equals', | 35 'equals', |
| 36 'init', | 36 'init', |
| 37 ]); | 37 ]); |
| 38 equal(configuration.outerHTML, '<a class="failing-builder" target="_blank" h
ref="http://build.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Linux"
><span class="version">lucid</span><span class="architecture">64-bit</span><span
class="failures"> update, webkit_tests</span></a>'); | 38 equal(configuration.outerHTML, '<a class="failing-builder" href="http://buil
d.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Linux"><span class="ve
rsion">lucid</span><span class="architecture">64-bit</span><span class="failures
"> update, webkit_tests</span></a>'); |
| 39 configuration = new ui.failures.Builder("WebKit XP"); | 39 configuration = new ui.failures.Builder("WebKit XP"); |
| 40 equal(configuration.outerHTML, '<a class="failing-builder" target="_blank" h
ref="http://build.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+XP"><s
pan class="version">xp</span></a>'); | 40 equal(configuration.outerHTML, '<a class="failing-builder" href="http://buil
d.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+XP"><span class="versi
on">xp</span></a>'); |
| 41 configuration._addSpan('foo', 'bar'); | 41 configuration._addSpan('foo', 'bar'); |
| 42 equal(configuration.outerHTML, '<a class="failing-builder" target="_blank" h
ref="http://build.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+XP"><s
pan class="version">xp</span><span class="foo">bar</span></a>'); | 42 equal(configuration.outerHTML, '<a class="failing-builder" href="http://buil
d.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+XP"><span class="versi
on">xp</span><span class="foo">bar</span></a>'); |
| 43 ok(configuration.equals({version: 'xp'})); | 43 ok(configuration.equals({version: 'xp'})); |
| 44 ok(!configuration.equals({version: 'lucid', is64bit: true})); | 44 ok(!configuration.equals({version: 'lucid', is64bit: true})); |
| 45 }); | 45 }); |
| 46 | 46 |
| 47 test('FailureGrid', 10, function() { | 47 test('FailureGrid', 10, function() { |
| 48 var grid = new ui.failures.FailureGrid(); | 48 var grid = new ui.failures.FailureGrid(); |
| 49 deepEqual(Object.getOwnPropertyNames(grid.__proto__).sort(), [ | 49 deepEqual(Object.getOwnPropertyNames(grid.__proto__).sort(), [ |
| 50 "_reset", | 50 "_reset", |
| 51 "_rowByResult", | 51 "_rowByResult", |
| 52 "init", | 52 "init", |
| (...skipping 28 matching lines...) Expand all Loading... |
| 81 raises(function() { | 81 raises(function() { |
| 82 grid.update({'Atari': {}}) | 82 grid.update({'Atari': {}}) |
| 83 }); | 83 }); |
| 84 grid.update({'WebKit Linux (dbg)': { actual: 'TEXT'}}); | 84 grid.update({'WebKit Linux (dbg)': { actual: 'TEXT'}}); |
| 85 equal(grid.outerHTML, '<table class="failures">' + | 85 equal(grid.outerHTML, '<table class="failures">' + |
| 86 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + | 86 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + |
| 87 '<tbody>' + | 87 '<tbody>' + |
| 88 '<tr class="TEXT">' + | 88 '<tr class="TEXT">' + |
| 89 '<td><span>TEXT</span></td>' + | 89 '<td><span>TEXT</span></td>' + |
| 90 '<td></td>' + | 90 '<td></td>' + |
| 91 '<td><a class="failing-builder" target="_blank" href="http://bui
ld.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span cl
ass="version">lucid</span><span class="architecture">64-bit</span></a></td>' + | 91 '<td><a class="failing-builder" href="http://build.chromium.org/
p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span class="version">lu
cid</span><span class="architecture">64-bit</span></a></td>' + |
| 92 '</tr>' + | 92 '</tr>' + |
| 93 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + | 93 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + |
| 94 '</tbody>' + | 94 '</tbody>' + |
| 95 '</table>'); | 95 '</table>'); |
| 96 grid.update({'WebKit Mac10.6': { actual: 'IMAGE+TEXT'}}); | 96 grid.update({'WebKit Mac10.6': { actual: 'IMAGE+TEXT'}}); |
| 97 equal(grid.outerHTML, '<table class="failures">' + | 97 equal(grid.outerHTML, '<table class="failures">' + |
| 98 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + | 98 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + |
| 99 '<tbody>' + | 99 '<tbody>' + |
| 100 '<tr class="IMAGE+TEXT">' + | 100 '<tr class="IMAGE+TEXT">' + |
| 101 '<td><span>IMAGE+TEXT</span></td>' + | 101 '<td><span>IMAGE+TEXT</span></td>' + |
| 102 '<td><a class="failing-builder" target="_blank" href="http://bui
ld.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Mac10.6"><span class=
"version">snowleopard</span></a></td>' + | 102 '<td><a class="failing-builder" href="http://build.chromium.org/
p/chromium.webkit/waterfall?builder=WebKit+Mac10.6"><span class="version">snowle
opard</span></a></td>' + |
| 103 '<td></td>' + | 103 '<td></td>' + |
| 104 '</tr>' + | 104 '</tr>' + |
| 105 '<tr class="TEXT">' + | 105 '<tr class="TEXT">' + |
| 106 '<td><span>TEXT</span></td>' + | 106 '<td><span>TEXT</span></td>' + |
| 107 '<td></td>' + | 107 '<td></td>' + |
| 108 '<td><a class="failing-builder" target="_blank" href="http://bui
ld.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span cl
ass="version">lucid</span><span class="architecture">64-bit</span></a></td>' + | 108 '<td><a class="failing-builder" href="http://build.chromium.org/
p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span class="version">lu
cid</span><span class="architecture">64-bit</span></a></td>' + |
| 109 '</tr>' + | 109 '</tr>' + |
| 110 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + | 110 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + |
| 111 '</tbody>' + | 111 '</tbody>' + |
| 112 '</table>'); | 112 '</table>'); |
| 113 grid.update({'WebKit Mac10.6': { actual: 'IMAGE+TEXT'}}); | 113 grid.update({'WebKit Mac10.6': { actual: 'IMAGE+TEXT'}}); |
| 114 equal(grid.outerHTML, '<table class="failures">' + | 114 equal(grid.outerHTML, '<table class="failures">' + |
| 115 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + | 115 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + |
| 116 '<tbody>' + | 116 '<tbody>' + |
| 117 '<tr class="IMAGE+TEXT">' + | 117 '<tr class="IMAGE+TEXT">' + |
| 118 '<td><span>IMAGE+TEXT</span></td>' + | 118 '<td><span>IMAGE+TEXT</span></td>' + |
| 119 '<td><a class="failing-builder" target="_blank" href="http://bui
ld.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Mac10.6"><span class=
"version">snowleopard</span></a></td>' + | 119 '<td><a class="failing-builder" href="http://build.chromium.org/
p/chromium.webkit/waterfall?builder=WebKit+Mac10.6"><span class="version">snowle
opard</span></a></td>' + |
| 120 '<td></td>' + | 120 '<td></td>' + |
| 121 '</tr>' + | 121 '</tr>' + |
| 122 '<tr class="TEXT">' + | 122 '<tr class="TEXT">' + |
| 123 '<td><span>TEXT</span></td>' + | 123 '<td><span>TEXT</span></td>' + |
| 124 '<td></td>' + | 124 '<td></td>' + |
| 125 '<td><a class="failing-builder" target="_blank" href="http://bui
ld.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span cl
ass="version">lucid</span><span class="architecture">64-bit</span></a></td>' + | 125 '<td><a class="failing-builder" href="http://build.chromium.org/
p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span class="version">lu
cid</span><span class="architecture">64-bit</span></a></td>' + |
| 126 '</tr>' + | 126 '</tr>' + |
| 127 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + | 127 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + |
| 128 '</tbody>' + | 128 '</tbody>' + |
| 129 '</table>'); | 129 '</table>'); |
| 130 grid.purge(); | 130 grid.purge(); |
| 131 grid.update({'WebKit Linux (dbg)': { actual: 'TEXT'}}); | 131 grid.update({'WebKit Linux (dbg)': { actual: 'TEXT'}}); |
| 132 equal(grid.outerHTML, '<table class="failures">' + | 132 equal(grid.outerHTML, '<table class="failures">' + |
| 133 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + | 133 '<thead><tr><td>type</td><td>release</td><td>debug</td></tr></thead>' + |
| 134 '<tbody>' + | 134 '<tbody>' + |
| 135 '<tr class="TEXT">' + | 135 '<tr class="TEXT">' + |
| 136 '<td><span>TEXT</span></td>' + | 136 '<td><span>TEXT</span></td>' + |
| 137 '<td></td>' + | 137 '<td></td>' + |
| 138 '<td><a class="failing-builder" target="_blank" href="http://bui
ld.chromium.org/p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span cl
ass="version">lucid</span><span class="architecture">64-bit</span></a></td>' + | 138 '<td><a class="failing-builder" href="http://build.chromium.org/
p/chromium.webkit/waterfall?builder=WebKit+Linux+(dbg)"><span class="version">lu
cid</span><span class="architecture">64-bit</span></a></td>' + |
| 139 '</tr>' + | 139 '</tr>' + |
| 140 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + | 140 '<tr class="BUILDING" style="display: none;"><td><span>BUILDING</spa
n></td><td></td><td></td></tr>' + |
| 141 '</tbody>' + | 141 '</tbody>' + |
| 142 '</table>'); | 142 '</table>'); |
| 143 }); | 143 }); |
| 144 | 144 |
| 145 }()); | 145 }()); |
| OLD | NEW |