Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js |
| index bb1ca19ec5297f1f2e8ea5a0e52e668b39523f21..c4daa5897b6fbc30a4aa453040604078a37a5647 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js |
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/inspector-unit-test.js |
| @@ -1,6 +1,6 @@ |
| var UnitTest = {}; |
| -(function() |
| -{ |
| +var startTest; |
| +(function() { |
| var lazyModules = []; |
| var oldLoadResourcePromise = Runtime.loadResourcePromise; |
| Runtime.loadResourcePromise = function(url) |
| @@ -14,10 +14,11 @@ var UnitTest = {}; |
| var parsedURL = new URL(url, location.href); |
| var parsedLocation = new URL(location.href); |
| + parsedURL.pathname = parsedURL.pathname.replace('/resources/', '/'); |
| // hosted devtools is confused. |
| parsedURL.pathname = parsedURL.pathname.replace('/inspector-unit/', '/inspector-debug/'); |
| return oldLoadResourcePromise(parsedURL.toString()); |
| - } |
| + }; |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| @@ -123,9 +124,11 @@ var UnitTest = {}; |
| } |
| window.onerror = completeTestOnError; |
| - Runtime.startApplication("/inspector-unit/inspector-unit-test").then(runTest); |
| + startTest = function (test) { |
| + Runtime.startApplication("/inspector-unit/inspector-unit-test").then(() => runTest(test)); |
|
einbinder
2016/11/22 02:19:45
Maybe don't force things to be wrapped in function
chenwilliam
2016/11/22 20:56:05
Done.
|
| + }; |
| - function runTest() |
| + function runTest(test) |
| { |
| var description = document.body.textContent.trim(); |
| if (description) |