| 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");
|
|
|
|
|