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

Unified Diff: LayoutTests/http/tests/inspector/compiler-script-mapping.html

Issue 697563003: DevTools: do not show compiled script while source maps are being loaded. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: w/ tests Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/compiler-script-mapping.html
diff --git a/LayoutTests/http/tests/inspector/compiler-script-mapping.html b/LayoutTests/http/tests/inspector/compiler-script-mapping.html
index b4e9eede9b5db062c8ebfb96de187af4234cf4f9..e821b43a44e0d7f9fa8d79ef17b65ea6298d9af0 100644
--- a/LayoutTests/http/tests/inspector/compiler-script-mapping.html
+++ b/LayoutTests/http/tests/inspector/compiler-script-mapping.html
@@ -39,6 +39,10 @@ function test()
function createWorkspaceWithTarget(userCallback)
{
InspectorTest.createWorkspace();
+
+ InspectorTest.testWorkspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, uiSourceCodeAdded);
+ InspectorTest.testWorkspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved, uiSourceCodeRemoved);
+
createMockTarget(callback);
function callback(target)
{
@@ -73,6 +77,18 @@ function test()
InspectorTest.testDebuggerWorkspaceBinding._reset(target);
}
+ function uiSourceCodeAdded(event)
+ {
+ var uiSourceCode = event.data;
+ InspectorTest.addResult("UISourceCodeAdded: [" + uiSourceCode.project().type() + "] " + uiSourceCode.url);
+ }
+
+ function uiSourceCodeRemoved(event)
+ {
+ var uiSourceCode = event.data;
+ InspectorTest.addResult("UISourceCodeRemoved: [" + uiSourceCode.project().type() + "] " + uiSourceCode.url);
+ }
+
InspectorTest.runTestSuite([
function testSimpleMap(next)
{
@@ -253,17 +269,21 @@ function test()
function originalResourceUISourceCodeAdded(uiSourceCode)
{
- InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(firstUISourceCodeAdded);
+ InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(stubUISourceCodeAdded, 1, WebInspector.projectTypes.Service);
originalUISourceCode = uiSourceCode;
}
+ function stubUISourceCodeAdded(uiSourceCode)
+ {
+ InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(firstUISourceCodeAdded);
+ }
+
function firstUISourceCodeAdded(uiSourceCode)
{
if (!uiSourceCode.url) {
InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(firstUISourceCodeAdded);
return;
}
-
InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(secondUISourceCodeAdded);
}
@@ -276,8 +296,9 @@ function test()
afterScriptAdded();
}
- function afterScriptAdded(uiSourceCode)
+ function afterScriptAdded()
{
+ InspectorTest.addResult("afterScriptAdded");
var uiSourceCode1 = InspectorTest.testWorkspace.uiSourceCodeForOriginURL("http://localhost:8000/inspector/resources/source1.js");
var uiSourceCode2 = InspectorTest.testWorkspace.uiSourceCodeForOriginURL("http://localhost:8000/inspector/resources/source2.js");
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698