/* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Tests that the inspector loads early without waiting for load events. const server = createTestHTTPServer(); // Register a slow image handler so we can simulate a long time between // a reload and the load event firing. server.registerContentType("gif", "image/gif"); function onPageResourceRequest() { return new Promise(done => { server.registerPathHandler("/slow.gif", function (metadata, response) { info("Image has been requested"); response.processAsync(); done(response); }); }); } // Test page load events. const TEST_URL = "data:text/html," + "" + "
" + "" + "Page loading slowly
" + "" + "" + "