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

Side by Side Diff: Tools/TestResultServer/static-dashboards/loader_unittests.js

Issue 14301012: Temporary fix for flakiness dashboard by avoiding loading mac snow leopard test expectation file fr… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed unit test Created 7 years, 8 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
« no previous file with comments | « Tools/TestResultServer/static-dashboards/flakiness_dashboard.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (C) Zan Dobersek <zandobersek@gmail.com> 1 // Copyright (C) Zan Dobersek <zandobersek@gmail.com>
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * 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 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } finally { 77 } finally {
78 loader.request = requestFunction; 78 loader.request = requestFunction;
79 } 79 }
80 }); 80 });
81 81
82 test('expectations files loading', 1, function() { 82 test('expectations files loading', 1, function() {
83 resetGlobals(); 83 resetGlobals();
84 g_history.parseCrossDashboardParameters(); 84 g_history.parseCrossDashboardParameters();
85 // FIXME: re-enable once added back in flakiness_dashboard.js 85 // FIXME: re-enable once added back in flakiness_dashboard.js
86 var expectedLoadedPlatforms = [/* "chromium", "chromium-android", */"efl", " efl-wk1", "efl-wk2", "gtk", 86 var expectedLoadedPlatforms = [/* "chromium", "chromium-android", */"efl", " efl-wk1", "efl-wk2", "gtk",
87 "gtk-wk2", "mac", "mac-lion", "mac-snowleopar d", "qt", "win", "wk2"]; 87 "gtk-wk2", "mac", "mac-lion", /*"mac-snowleop ard", */"qt", "win", "wk2"];
88 var loadedPlatforms = []; 88 var loadedPlatforms = [];
89 var resourceLoader = new loader.Loader(); 89 var resourceLoader = new loader.Loader();
90 resourceLoader._loadNext = function() { 90 resourceLoader._loadNext = function() {
91 deepEqual(loadedPlatforms.sort(), expectedLoadedPlatforms); 91 deepEqual(loadedPlatforms.sort(), expectedLoadedPlatforms);
92 } 92 }
93 93
94 var requestFunction = loader.request; 94 var requestFunction = loader.request;
95 loader.request = function(url, successCallback, errorCallback) { 95 loader.request = function(url, successCallback, errorCallback) {
96 loadedPlatforms.push(/LayoutTests\/platform\/(.+)\/TestExpectations/.exe c(url)[1]); 96 loadedPlatforms.push(/LayoutTests\/platform\/(.+)\/TestExpectations/.exe c(url)[1]);
97 successCallback({responseText: ''}); 97 successCallback({responseText: ''});
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 'baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]}, 161 'baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
162 } 162 }
163 } 163 }
164 }; 164 };
165 var expectedFlattenedTests = { 165 var expectedFlattenedTests = {
166 'bar.html': {'results': [[100, 'F']], 'times': [[100, 0]]}, 166 'bar.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
167 'foo/bar/baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]}, 167 'foo/bar/baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
168 }; 168 };
169 equal(JSON.stringify(loader.Loader._flattenTrie(tests)), JSON.stringify(expe ctedFlattenedTests)) 169 equal(JSON.stringify(loader.Loader._flattenTrie(tests)), JSON.stringify(expe ctedFlattenedTests))
170 }); 170 });
OLDNEW
« no previous file with comments | « Tools/TestResultServer/static-dashboards/flakiness_dashboard.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698