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

Side by Side Diff: Tools/GardeningServer/scripts/results_unittests.js

Issue 459463003: Convert moar Sheriff-o-Matic tests to Polymer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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) 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 equals(results.resultType("http://example.com/foo.bar-diff.txt"), "text"); 73 equals(results.resultType("http://example.com/foo.bar-diff.txt"), "text");
74 equals(results.resultType("http://example.com/foo-actual.png"), "image"); 74 equals(results.resultType("http://example.com/foo-actual.png"), "image");
75 equals(results.resultType("http://example.com/foo-expected.png"), "image"); 75 equals(results.resultType("http://example.com/foo-expected.png"), "image");
76 equals(results.resultType("http://example.com/foo-diff.png"), "image"); 76 equals(results.resultType("http://example.com/foo-diff.png"), "image");
77 equals(results.resultType("http://example.com/foo-pretty-diff.html"), "text" ); 77 equals(results.resultType("http://example.com/foo-pretty-diff.html"), "text" );
78 equals(results.resultType("http://example.com/foo-wdiff.html"), "text"); 78 equals(results.resultType("http://example.com/foo-wdiff.html"), "text");
79 equals(results.resultType("http://example.com/foo.xyz"), "text"); 79 equals(results.resultType("http://example.com/foo.xyz"), "text");
80 }); 80 });
81 81
82 asyncTest("fetchResultsURLs", 5, function() { 82 asyncTest("fetchResultsURLs", 5, function() {
83 var simulator = new NetworkSimulator(); 83 var simulator = new NetworkSimulator(ok, start);
84 84
85 var probedURLs = []; 85 var probedURLs = [];
86 simulator.probe = function(url) 86 simulator.probe = function(url)
87 { 87 {
88 probedURLs.push(url); 88 probedURLs.push(url);
89 if (url.endsWith('.txt')) 89 if (url.endsWith('.txt'))
90 return Promise.resolve(); 90 return Promise.resolve();
91 else if (/taco.+png$/.test(url)) 91 else if (/taco.+png$/.test(url))
92 return Promise.resolve(); 92 return Promise.resolve();
93 else 93 else
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 MockResultsBaseURL + "/userscripts/taco-diff.png", 136 MockResultsBaseURL + "/userscripts/taco-diff.png",
137 MockResultsBaseURL + "/userscripts/taco-actual.txt", 137 MockResultsBaseURL + "/userscripts/taco-actual.txt",
138 MockResultsBaseURL + "/userscripts/taco-expected.txt", 138 MockResultsBaseURL + "/userscripts/taco-expected.txt",
139 MockResultsBaseURL + "/userscripts/taco-diff.txt", 139 MockResultsBaseURL + "/userscripts/taco-diff.txt",
140 ]); 140 ]);
141 start(); 141 start();
142 }); 142 });
143 }); 143 });
144 144
145 })(); 145 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698