| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |