Bug 99324 - Web Inspector: Scripts for dynamically added script elements are not shown in sources panel.
Summary: Web Inspector: Scripts for dynamically added script elements are not shown in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-15 07:24 PDT by Vsevolod Vlasov
Modified: 2012-10-15 09:46 PDT (History)
12 users (show)

See Also:


Attachments
Patch (13.26 KB, patch)
2012-10-15 07:56 PDT, Vsevolod Vlasov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2012-10-15 07:24:40 PDT
Patch to follow.
Comment 1 Vsevolod Vlasov 2012-10-15 07:31:05 PDT
Scripts added with

var scriptElement = document.createElement("script");
scriptElement.src = url;
document.head.appendChild(scriptElement);
Are not shown if inspector is opened after the script was loaded.

var scriptElement = document.createElement("script");
scriptElement.textContent = script;
document.head.appendChild(scriptElement);
are not shown at all.
Comment 2 Vsevolod Vlasov 2012-10-15 07:56:32 PDT
Created attachment 168711 [details]
Patch
Comment 3 Vsevolod Vlasov 2012-10-15 08:06:18 PDT
Committed r131302: <http://trac.webkit.org/changeset/131302>
Comment 4 Csaba Osztrogonác 2012-10-15 08:58:38 PDT
(In reply to comment #3)
> Committed r131302: <http://trac.webkit.org/changeset/131302>

It broke 2 tests everywhere:
--- /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/http/tests/inspector-enabled/dynamic-scripts-expected.txt
+++ /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/http/tests/inspector-enabled/dynamic-scripts-actual.txt
@@ -4,9 +4,5 @@
 UISourceCodes:
     dynamic-script.js
     dynamic-scripts.html
-    dynamic-scripts.html (1)
-    dynamic-scripts.html (2)
-    evalSourceURL.js
     inspector-test.js
-    scriptElementContentSourceURL.js
 

--- /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/inspector/debugger/dynamic-scripts-expected.txt
+++ /Volumes/Data/slave/lion-release-tests-wk1/build/layout-test-results/inspector/debugger/dynamic-scripts-actual.txt
@@ -5,9 +5,5 @@
 UISourceCodes:
     dynamic-script.js
     dynamic-scripts.html
-    dynamic-scripts.html (1)
-    dynamic-scripts.html (2)
-    evalSourceURL.js
     inspector-test.js
-    scriptElementContentSourceURL.js
Comment 5 Vsevolod Vlasov 2012-10-15 09:46:20 PDT
Thanks for the headsup,
Landed a fix: Committed r131309: <http://trac.webkit.org/changeset/131309>