Bug 104384 - Web Inspector: Pass the script url to the script-preprocessor script
Summary: Web Inspector: Pass the script url to the script-preprocessor script
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 11:41 PST by johnjbarton
Modified: 2013-01-13 04:40 PST (History)
17 users (show)

See Also:


Attachments
Patch (9.44 KB, patch)
2012-12-07 12:10 PST, johnjbarton
no flags Details | Formatted Diff | Diff
Patch (9.48 KB, patch)
2012-12-10 10:30 PST, johnjbarton
no flags Details | Formatted Diff | Diff
Patch (9.60 KB, patch)
2013-01-09 10:43 PST, johnjbarton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description johnjbarton 2012-12-07 11:41:30 PST
Bug 80922 introduced a script preprocessor. Here we add an argument to the preprocessing script supplying the script url or 'name'.  That way the preprocessor script can make processing decisions based on the name.
Comment 1 johnjbarton 2012-12-07 12:10:55 PST
Created attachment 178250 [details]
Patch
Comment 2 johnjbarton 2012-12-07 12:11:55 PST
(In reply to comment #0)
... Bug 80992 introduced a script preprocessor.
Comment 3 Pavel Feldman 2012-12-07 12:19:14 PST
Comment on attachment 178250 [details]
Patch

Sorry for not landing the tests part. Lets give the bots a chance to cycle.
Comment 4 Build Bot 2012-12-07 14:43:52 PST
Comment on attachment 178250 [details]
Patch

Attachment 178250 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15186531

New failing tests:
inspector/debugger/debugger-script-preprocessor.html
Comment 5 johnjbarton 2012-12-10 10:30:01 PST
Created attachment 178585 [details]
Patch
Comment 6 johnjbarton 2012-12-10 10:31:49 PST
I don't know how to find out what error occurred on the mac EWS.
Comment 7 Pavel Feldman 2012-12-10 10:44:08 PST
(In reply to comment #6)
> I don't know how to find out what error occurred on the mac EWS.

We need to get some good expectations for the JSC ports. I can make one via making a qt build for you.
Comment 8 Build Bot 2012-12-11 01:44:27 PST
Comment on attachment 178585 [details]
Patch

Attachment 178585 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15260305

New failing tests:
inspector/debugger/debugger-script-preprocessor.html
Comment 9 Pavel Feldman 2012-12-11 09:01:32 PST
Comment on attachment 178585 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=178585&action=review

> LayoutTests/inspector/debugger/debugger-script-preprocessor-expected.txt:5
> +inspector-test.js.js

It should be inspector-test.js (not .js.js)

> LayoutTests/inspector/debugger/debugger-script-preprocessor-expected.txt:6
> +debugger-test.js.js

ditto

> LayoutTests/inspector/debugger/debugger-script-preprocessor-expected.txt:7
> +debugger-script-preprocessor.html

This should occur only once
Comment 10 johnjbarton 2012-12-11 09:30:36 PST
(In reply to comment #9)
> (From update of attachment 178585 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178585&action=review
> 
> > LayoutTests/inspector/debugger/debugger-script-preprocessor-expected.txt:5
> > +inspector-test.js.js
> 
> It should be inspector-test.js (not .js.js)
> 
> > LayoutTests/inspector/debugger/debugger-script-preprocessor-expected.txt:6
> > +debugger-test.js.js
> 
> ditto

Note: this part of the test was added for bug 104384, beyond bug 80992

I added the ".js" to be certain that the output resulted from the preprocessor call and thus to be certain that the test did indeed use the |name| argument. Would it be clearer if I used ".verified" or some such? 

> 
> > LayoutTests/inspector/debugger/debugger-script-preprocessor-expected.txt:7
> > +debugger-script-preprocessor.html
> 
> This should occur only once

I guess one comes from the <script> tag and one from the 
   onload="load()"
but in any case how can I prevent this second occurrence?
Comment 11 johnjbarton 2013-01-07 11:55:07 PST
(In reply to comment #8)
> New failing tests:
> inspector/debugger/debugger-script-preprocessor.html

Is it appropriate to skip this test on Mac via the LayoutTests/platform/mac/TestExpectaions ?
Comment 12 Pavel Feldman 2013-01-09 05:47:18 PST
(In reply to comment #11)
> (In reply to comment #8)
> > New failing tests:
> > inspector/debugger/debugger-script-preprocessor.html
> 
> Is it appropriate to skip this test on Mac via the LayoutTests/platform/mac/TestExpectaions ?

I think you should land jsc expectations and the main ones and chromium as specific. I.e. as in your patch. It is just that jsc expectations needed tweaking in the places I suggested.
Comment 13 johnjbarton 2013-01-09 08:03:56 PST
(In reply to comment #12)
> I think you should land jsc expectations and the main ones and chromium as specific. I.e. as in your patch. It is just that jsc expectations needed tweaking in the places I suggested.

Sorry I don't understand how to do this. I guess 'jsc' is the Safari port? What tweaks are needed, where might they go and how could I test them?
Comment 14 Pavel Feldman 2013-01-09 08:14:35 PST
(In reply to comment #13)
> (In reply to comment #12)
> > I think you should land jsc expectations and the main ones and chromium as specific. I.e. as in your patch. It is just that jsc expectations needed tweaking in the places I suggested.
> 
> Sorry I don't understand how to do this. I guess 'jsc' is the Safari port? What tweaks are needed, where might they go and how could I test them?

Comment #9 describes what needs to change. You can only test it using EWS.
Comment 15 johnjbarton 2013-01-09 10:28:09 PST
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #12)
> > > I think you should land jsc expectations and the main ones and chromium as specific. I.e. as in your patch. It is just that jsc expectations needed tweaking in the places I suggested.
> > 
> > Sorry I don't understand how to do this. I guess 'jsc' is the Safari port? What tweaks are needed, where might they go and how could I test them?
> 
> Comment #9 describes what needs to change. You can only test it using EWS.

What I did not realize is that there are two different ...expected.txt files. The one in comment #9 is apparently the "jsc expectations", and it should reflect the test running without this preprocessor. I suppose then that its content can be predicted simply by disabling the preprocessor and copying the test results.

The other file, 
 LayoutTests/platform/chromium/inspector/debugger/debugger-script-preprocessor-expected.txt
 is the one that is used when testing chromium and it should contain the preprocessed results.
Comment 16 johnjbarton 2013-01-09 10:43:09 PST
Created attachment 181946 [details]
Patch
Comment 17 WebKit Review Bot 2013-01-10 22:18:31 PST
Comment on attachment 181946 [details]
Patch

Clearing flags on attachment: 181946

Committed r139405: <http://trac.webkit.org/changeset/139405>
Comment 18 WebKit Review Bot 2013-01-10 22:18:37 PST
All reviewed patches have been landed.  Closing bug.
Comment 19 Chris Dumez 2013-01-13 04:34:40 PST
New test is failing on EFL port and the diff is different for each build:

--- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-expected.txt
+++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-actual.txt
@@ -4,8 +4,8 @@
 Page reloaded.
 inspector-test.js
 debugger-test.js
+
 debugger-script-preprocessor.html
-
 
 Page reloaded.
 Debugger was disabled.

--- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-expected.txt
+++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-actual.txt
@@ -2,9 +2,9 @@
 
 Debugger was enabled.
 Page reloaded.
-inspector-test.js
 debugger-test.js
 debugger-script-preprocessor.html
+inspector-test.js
 
 
 Page reloaded.

--- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-expected.txt
+++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-actual.txt
@@ -2,11 +2,11 @@
 
 Debugger was enabled.
 Page reloaded.
+
 inspector-test.js
 debugger-test.js
+
 debugger-script-preprocessor.html
-
-
 Page reloaded.
 Debugger was disabled.
Comment 20 Chris Dumez 2013-01-13 04:40:52 PST
(In reply to comment #19)
> New test is failing on EFL port and the diff is different for each build:
> 
> --- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-expected.txt
> +++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-actual.txt
> @@ -4,8 +4,8 @@
>  Page reloaded.
>  inspector-test.js
>  debugger-test.js
> +
>  debugger-script-preprocessor.html
> -
> 
>  Page reloaded.
>  Debugger was disabled.
> 
> --- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-expected.txt
> +++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-actual.txt
> @@ -2,9 +2,9 @@
> 
>  Debugger was enabled.
>  Page reloaded.
> -inspector-test.js
>  debugger-test.js
>  debugger-script-preprocessor.html
> +inspector-test.js
> 
> 
>  Page reloaded.
> 
> --- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-expected.txt
> +++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/inspector/debugger/debugger-script-preprocessor-actual.txt
> @@ -2,11 +2,11 @@
> 
>  Debugger was enabled.
>  Page reloaded.
> +
>  inspector-test.js
>  debugger-test.js
> +
>  debugger-script-preprocessor.html
> -
> -
>  Page reloaded.
>  Debugger was disabled.

New test skipped for EFL port in http://trac.webkit.org/changeset/139564