Changeset 145539 in webkit
- Timestamp:
- Mar 12, 2013 6:10:40 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r145536 r145539 1 2013-03-12 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: ResourceScriptFile diverged state should be correctly reset after debugger reset. 4 https://bugs.webkit.org/show_bug.cgi?id=112036 5 6 Reviewed by Alexander Pavlov. 7 8 * inspector/debugger/file-system-project-mapping-expected.txt: 9 * inspector/debugger/file-system-project-mapping.html: 10 1 11 2013-03-12 Vsevolod Vlasov <vsevik@chromium.org> 2 12 -
trunk/LayoutTests/inspector/debugger/file-system-project-mapping-expected.txt
r145536 r145539 1 Tests file system project .1 Tests file system project mappings. 2 2 3 3 … … 19 19 filesystem:/var/www/bar.js -> 20 20 21 Running: testScriptFileOnReloadWithDirtyFile 22 Adding file system. 23 - hasDivergedFromVM: false 24 Editing uiSourceCode: 25 - hasDivergedFromVM: true 26 Committing uiSourceCode with live edit failure: 27 - hasDivergedFromVM: true 28 Editing uiSourceCode again: 29 - hasDivergedFromVM: true 30 Committing uiSourceCode again (with live edit success now): 31 - hasDivergedFromVM: false 32 Reloading page: 33 - hasDivergedFromVM: false 34 Editing uiSourceCode again and reloading while it is dirty: 35 - hasDivergedFromVM: true 36 -
trunk/LayoutTests/inspector/debugger/file-system-project-mapping.html
r145536 r145539 87 87 InspectorTest.testFileMapping.setMappingEntries([]); 88 88 next(); 89 }, 90 91 function testScriptFileOnReloadWithDirtyFile(next) 92 { 93 function uiSourceCodeAdded(uiSourceCode) { } 94 95 function reload() 96 { 97 resourceScriptMapping._debuggerReset(); 98 defaultScriptMapping._debuggerReset(); 99 script = InspectorTest.createScriptMock("http://localhost/html/foo.js", 0, 0, false, "<foo content>"); 100 InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(uiSourceCodeAdded, 1); 101 defaultScriptMapping.addScript(script); 102 resourceScriptMapping.addScript(script); 103 } 104 105 var fileSystemPath = "/var/www"; 106 var fileSystemProjectId = WebInspector.FileSystemProjectDelegate.projectId(fileSystemPath); 107 var files = {"/html/foo.js": "<foo content>", "/bar.js": "<bar content>"}; 108 createObjects(); 109 var entry1 = new WebInspector.FileMapping.Entry("http://localhost/", "/var/www/"); 110 InspectorTest.testFileMapping.setMappingEntries([entry1]); 111 InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(uiSourceCodeAdded, 2); 112 InspectorTest.addResult("Adding file system."); 113 manager.addMockFileSystem(fileSystemPath, files); 114 115 reload(); 116 117 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCode(fileSystemProjectId, ["html", "foo.js"]); 118 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 119 InspectorTest.addResult("Editing uiSourceCode:"); 120 uiSourceCode.setWorkingCopy("<foo content edited>"); 121 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 122 123 function setScriptSourceOverrideFailure(scriptId, newContent, callback) 124 { 125 callback("error"); 126 } 127 InspectorTest.override(WebInspector.debuggerModel, "setScriptSource", setScriptSourceOverrideFailure); 128 InspectorTest.addResult("Committing uiSourceCode with live edit failure:"); 129 uiSourceCode.commitWorkingCopy(function() { }); 130 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 131 132 InspectorTest.addResult("Editing uiSourceCode again:"); 133 uiSourceCode.setWorkingCopy("<foo content edited again>"); 134 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 135 136 function setScriptSourceOverrideSuccess(scriptId, newContent, callback) 137 { 138 callback(); 139 } 140 InspectorTest.override(WebInspector.debuggerModel, "setScriptSource", setScriptSourceOverrideSuccess); 141 InspectorTest.addResult("Committing uiSourceCode again (with live edit success now):"); 142 uiSourceCode.commitWorkingCopy(function() { }); 143 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 144 145 InspectorTest.addResult("Reloading page:"); 146 reload(); 147 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 148 149 InspectorTest.addResult("Editing uiSourceCode again and reloading while it is dirty:"); 150 uiSourceCode.setWorkingCopy("<foo content edited and dirty>"); 151 reload(); 152 InspectorTest.addResult(" - hasDivergedFromVM: " + !!uiSourceCode.scriptFile().hasDivergedFromVM()); 153 next(); 89 154 } 90 155 ]); … … 93 158 </head> 94 159 <body onload="runTest()"> 95 <p>Tests file system project .</p>160 <p>Tests file system project mappings.</p> 96 161 </body> 97 162 </html> -
trunk/Source/WebCore/ChangeLog
r145538 r145539 1 2013-03-12 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: ResourceScriptFile diverged state should be correctly reset after debugger reset. 4 https://bugs.webkit.org/show_bug.cgi?id=112036 5 6 Reviewed by Alexander Pavlov. 7 8 * inspector/front-end/ResourceScriptMapping.js: 9 (WebInspector.ResourceScriptFile): 10 (WebInspector.ResourceScriptFile.prototype._workingCopyChanged): 11 (WebInspector.ResourceScriptFile.prototype._maybeDirtyChanged): 12 1 13 2013-03-12 Marja Hölttä <marja@chromium.org> 2 14 -
trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js
r144669 r145539 265 265 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this); 266 266 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this); 267 this._maybeDirtyChanged(false); 267 268 } 268 269 … … 297 298 { 298 299 var wasDirty = /** @type {boolean} */ (event.data.wasDirty); 300 this._maybeDirtyChanged(wasDirty); 301 }, 302 303 _maybeDirtyChanged: function(wasDirty) 304 { 299 305 if (!wasDirty && this._uiSourceCode.isDirty() && !this._hasDivergedFromVM) { 300 306 this._isDivergingFromVM = true;
Note: See TracChangeset
for help on using the changeset viewer.