Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: LayoutTests/animations/interpolation/resources/interpolation-test.js

Issue 26979002: CSS Animations: Simplify interpolation test results under test-runner (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectations. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 style.parentNode.removeChild(style); 97 style.parentNode.removeChild(style);
98 } else { 98 } else {
99 var resultString = ''; 99 var resultString = '';
100 for (var i = 0; i < targets.length; i++) { 100 for (var i = 0; i < targets.length; i++) {
101 resultString += targets[i].getResultString() + '\n'; 101 resultString += targets[i].getResultString() + '\n';
102 } 102 }
103 var results = document.createElement('div'); 103 var results = document.createElement('div');
104 results.style.whiteSpace = 'pre'; 104 results.style.whiteSpace = 'pre';
105 results.textContent = resultString; 105 results.textContent = resultString;
106 results.id = 'results';
106 document.body.appendChild(results); 107 document.body.appendChild(results);
107 } 108 }
108 } 109 }
109 110
110 function convertToReference() { 111 function convertToReference() {
111 console.assert(isRefTest); 112 console.assert(isRefTest);
112 var scripts = document.querySelectorAll('script'); 113 var scripts = document.querySelectorAll('script');
113 for (var i = 0; i < scripts.length; i++) { 114 for (var i = 0; i < scripts.length; i++) {
114 scripts[i].parentNode.removeChild(scripts[i]); 115 scripts[i].parentNode.removeChild(scripts[i]);
115 } 116 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 278
278 var finished = false; 279 var finished = false;
279 function finishTest() { 280 function finishTest() {
280 finished = true; 281 finished = true;
281 dumpResults(); 282 dumpResults();
282 if (afterTestCallback) { 283 if (afterTestCallback) {
283 afterTestCallback(); 284 afterTestCallback();
284 } 285 }
285 if (window.testRunner) { 286 if (window.testRunner) {
286 if (!isRefTest) { 287 if (!isRefTest) {
288 var results = document.querySelector('#results');
289 document.documentElement.textContent = '';
290 document.documentElement.appendChild(results);
287 testRunner.dumpAsText(); 291 testRunner.dumpAsText();
288 } 292 }
289 testRunner.notifyDone(); 293 testRunner.notifyDone();
290 } 294 }
291 } 295 }
292 296
293 if (window.testRunner) { 297 if (window.testRunner) {
294 testRunner.waitUntilDone(); 298 testRunner.waitUntilDone();
295 } 299 }
296 300
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 finishTest(); 350 finishTest();
347 }, 10000); 351 }, 10000);
348 } 352 }
349 353
350 window.runAsRefTest = runAsRefTest; 354 window.runAsRefTest = runAsRefTest;
351 window.testInterpolationAt = testInterpolationAt; 355 window.testInterpolationAt = testInterpolationAt;
352 window.assertInterpolation = assertInterpolation; 356 window.assertInterpolation = assertInterpolation;
353 window.convertToReference = convertToReference; 357 window.convertToReference = convertToReference;
354 window.afterTest = afterTest; 358 window.afterTest = afterTest;
355 })(); 359 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698