Changeset 84165 in webkit
- Timestamp:
- Apr 18, 2011 12:04:33 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r84160 r84165 1 2011-04-18 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 add labels to results html page 6 https://bugs.webkit.org/show_bug.cgi?id=58803 7 8 -fix iframe size to be the size of the png results 9 -fix a bunch of aesthetic nits 10 -fix some incorrectly styled code 11 12 * Scripts/webkitpy/layout_tests/layout_package/json_results.html: 13 1 14 2011-04-18 Chang Shu <cshu@webkit.org> 2 15 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results.html
r84086 r84165 1 1 <!DocType html> 2 2 <style> 3 body { 4 margin: 4px; 5 } 6 7 body > p:first-of-type { 8 margin-top: 0; 9 } 10 3 11 tr:first-of-type:hover { 4 12 opacity: 0.7 … … 31 39 32 40 .results-row iframe { 33 width: 600px;34 height: 400px;41 width: 800px; 42 height: 600px; 35 43 } 36 44 37 45 #options { 38 46 position: absolute; 39 top: 0;40 right: 0;47 top: 4px; 48 right: 4px; 41 49 } 42 50 … … 57 65 left: 1px; 58 66 } 67 68 .result-container { 69 display: inline-block; 70 border: 1px solid gray; 71 } 72 73 .result-container iframe, .result-container img { 74 border: 0; 75 border-top: 1px solid lightgray; 76 } 77 78 .label { 79 padding-left: 3px; 80 font-weight: bold; 81 font-size: small; 82 } 59 83 </style> 60 84 … … 103 127 function appendResultIframe(src, parent) 104 128 { 105 // FIXME: label the iframes appropriately 106 var result = document.createElement('iframe'); 107 result.src = src; 108 parent.appendChild(result); 129 // FIXME: use IMG tags for pixel results. 130 var layoutTestsIndex = src.indexOf('LayoutTests'); 131 var name; 132 if (layoutTestsIndex != -1) { 133 var hasTrac = src.indexOf('trac.webkit.org') != -1; 134 var prefix = hasTrac ? 'trac.webkit.org/.../' : ''; 135 name = prefix + src.substring(layoutTestsIndex + 'LayoutTests/'.length); 136 } else { 137 var lastDashIndex = src.lastIndexOf('-pretty'); 138 if (lastDashIndex == -1) 139 lastDashIndex = src.lastIndexOf('-'); 140 name = src.substring(lastDashIndex + 1); 141 } 142 143 var container = document.createElement('div'); 144 container.className = 'result-container'; 145 container.innerHTML = '<div class=label>' + name + '</div><iframe src="' + src + '?format=txt"></iframe>'; 146 parent.appendChild(container); 109 147 } 110 148 … … 150 188 function testLink(test) 151 189 { 152 var test_base_path;190 var basePath; 153 191 if (results.layout_tests_dir && location.toString().indexOf('file://') == 0) 154 test_base_path = results.layout_tests_dir + '/';192 basePath = results.layout_tests_dir + '/'; 155 193 else 156 test_base_path = 'http://trac.webkit.org/browser/trunk/LayoutTests/';194 basePath = 'http://trac.webkit.org/browser/trunk/LayoutTests/'; 157 195 return '<span class=expand-button onclick="expandExpectations(event)"><span class=expand-button-text>+</span></span>' + 158 '<a class=test-link href="' + test_base_path + test + '">' + test + '</a>';159 } 160 161 function resultLink(test _prefix, suffix, contents)162 { 163 return '<a class=result-link href="' + test _prefix + suffix + '">' + contents + '</a> ';196 '<a class=test-link href="' + basePath + test + '">' + test + '</a>'; 197 } 198 199 function resultLink(testPrefix, suffix, contents) 200 { 201 return '<a class=result-link href="' + testPrefix + suffix + '">' + contents + '</a> '; 164 202 } 165 203 … … 244 282 } 245 283 284 // FIXME: We need to append image results here as well? 246 285 if (newTests.length) 247 286 appendTestList(newTests, 'Tests that had no expected results (probably new):', 'new-tests-table', '-actual.txt', 'result');
Note: See TracChangeset
for help on using the changeset viewer.