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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 onebar.select('expected'); | 67 onebar.select('expected'); |
68 equal(window.location.hash, '#expected'); | 68 equal(window.location.hash, '#expected'); |
69 onebar.select('unexpected'); | 69 onebar.select('unexpected'); |
70 equal(window.location.hash, '#unexpected'); | 70 equal(window.location.hash, '#unexpected'); |
71 | 71 |
72 $(onebar).detach(); | 72 $(onebar).detach(); |
73 }); | 73 }); |
74 | 74 |
75 // FIXME: These three results.* tests should be moved ot ui/results_unittests.js
. | 75 // FIXME: These three results.* tests should be moved ot ui/results_unittests.js
. |
76 test("results.ResultsGrid", 1, function() { | 76 test("results.ResultsGrid", 8, function() { |
77 var grid = new ui.results.ResultsGrid() | 77 var grid = new ui.results.ResultsGrid() |
78 grid.addResults([ | 78 grid.addResults([ |
79 'http://example.com/layout-test-results/foo-bar-diff.txt', | 79 'http://example.com/foo-bar-diff.txt', |
80 'http://example.com/layout-test-results/foo-bar-expected.png', | 80 'http://example.com/foo-bar-expected.png', |
81 'http://example.com/layout-test-results/foo-bar-actual.png', | 81 'http://example.com/foo-bar-actual.png', |
82 'http://example.com/layout-test-results/foo-bar-diff.png', | 82 'http://example.com/foo-bar-diff.png', |
83 ]); | 83 ]); |
84 equal(grid.innerHTML, | 84 |
85 '<div class="comparison">' + | 85 var comparisons = grid.querySelectorAll("ct-results-comparison"); |
86 '<div>' + | 86 |
87 '<h2>Expected</h2>' + | 87 equal(comparisons[0].type, "text"); |
88 '<div class="results-container expected">' + | 88 equal(comparisons[0].actualUrl, ""); |
89 '<img class="image-result" src="http://example.com/layout-te
st-results/foo-bar-expected.png">' + | 89 equal(comparisons[0].expectedUrl, ""); |
90 '</div>' + | 90 equal(comparisons[0].diffUrl, "http://example.com/foo-bar-diff.txt"); |
91 '</div>' + | 91 |
92 '<div>' + | 92 equal(comparisons[1].type, "image"); |
93 '<h2>Actual</h2>' + | 93 equal(comparisons[1].actualUrl, "http://example.com/foo-bar-actual.png"); |
94 '<div class="results-container actual">' + | 94 equal(comparisons[1].expectedUrl, "http://example.com/foo-bar-expected.png")
; |
95 '<img class="image-result" src="http://example.com/layout-te
st-results/foo-bar-actual.png">' + | 95 equal(comparisons[1].diffUrl, "http://example.com/foo-bar-diff.png"); |
96 '</div>' + | |
97 '</div>' + | |
98 '<div>' + | |
99 '<h2>Diff</h2>' + | |
100 '<div class="results-container diff">' + | |
101 '<img class="image-result" src="http://example.com/layout-te
st-results/foo-bar-diff.png">' + | |
102 '</div>' + | |
103 '</div>' + | |
104 '</div>' + | |
105 '<div class="comparison">' + | |
106 '<div>' + | |
107 '<h2>Expected</h2>' + | |
108 '<div class="results-container expected"></div>' + | |
109 '</div>' + | |
110 '<div>' + | |
111 '<h2>Actual</h2>' + | |
112 '<div class="results-container actual"></div>' + | |
113 '</div>' + | |
114 '<div>' + | |
115 '<h2>Diff</h2>' + | |
116 '<div class="results-container diff">' + | |
117 '<iframe class="text-result" src="http://example.com/layout-
test-results/foo-bar-diff.txt"></iframe>' + | |
118 '</div>' + | |
119 '</div>' + | |
120 '</div>'); | |
121 }); | 96 }); |
122 | 97 |
123 test("results.ResultsGrid (crashlog)", 1, function() { | 98 test("results.ResultsGrid (crashlog)", 1, function() { |
124 var grid = new ui.results.ResultsGrid() | 99 var grid = new ui.results.ResultsGrid() |
125 grid.addResults(['http://example.com/layout-test-results/foo-bar-crash-log.t
xt']); | 100 grid.addResults(['http://example.com/layout-test-results/foo-bar-crash-log.t
xt']); |
126 equal(grid.innerHTML, '<iframe class="text-result" src="http://example.com/l
ayout-test-results/foo-bar-crash-log.txt"></iframe>'); | 101 equal(grid.innerHTML, '<iframe src="http://example.com/layout-test-results/f
oo-bar-crash-log.txt" '+ |
| 102 'style="border: 0px; width: 100%; height: 400px;"></iframe>'); |
127 }); | 103 }); |
128 | 104 |
129 test("results.ResultsGrid (empty)", 1, function() { | 105 test("results.ResultsGrid (empty)", 1, function() { |
130 var grid = new ui.results.ResultsGrid() | 106 var grid = new ui.results.ResultsGrid() |
131 grid.addResults([]); | 107 grid.addResults([]); |
132 equal(grid.innerHTML, 'No results to display.'); | 108 equal(grid.innerHTML, 'No results to display.'); |
133 }); | 109 }); |
134 | 110 |
135 test("StatusArea", 3, function() { | 111 test("StatusArea", 3, function() { |
136 var statusArea = new ui.StatusArea(); | 112 var statusArea = new ui.StatusArea(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 '</table>' + | 369 '</table>' + |
394 '</details>' + | 370 '</details>' + |
395 ', trunk is at <a href="http://src.chromium.org/viewvc/blink?vie
w=rev&revision=555">555</a>' + | 371 ', trunk is at <a href="http://src.chromium.org/viewvc/blink?vie
w=rev&revision=555">555</a>' + |
396 '<br>' + | 372 '<br>' + |
397 'Last roll is to <a href="http://src.chromium.org/viewvc/blink?v
iew=rev&revision=440">440</a><span class="critical">(115 revisions behind)</
span>, current autoroll <a href="https://codereview.chromium.org/1000">440:550</
a>'); | 373 'Last roll is to <a href="http://src.chromium.org/viewvc/blink?v
iew=rev&revision=440">440</a><span class="critical">(115 revisions behind)</
span>, current autoroll <a href="https://codereview.chromium.org/1000">440:550</
a>'); |
398 start(); | 374 start(); |
399 }); | 375 }); |
400 }); | 376 }); |
401 | 377 |
402 })(); | 378 })(); |
OLD | NEW |