Skip Menu |

This queue is for tickets about the WebService-Google-Closure CPAN distribution.

Report information
The Basics
Id: 110454
Status: resolved
Priority: 0/
Queue: WebService-Google-Closure

People
Owner: MERIXZON [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.10
Fixed in: 0.11



Subject: Bad code produces a javascript alert now
The test suite currently fails: # Failed test 'Compilation of bad code file was a failure' # at t/integration_test.t line 85. # Failed test '...no code' # at t/integration_test.t line 86. # Failed test '...but has errors' # at t/integration_test.t line 88. # Looks like you failed 3 tests of 20. t/integration_test.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/20 subtests I guess that the problem is that google now returns a 200 OK even on bad code, but now with a javascript alert. strace shows the following: 29823 11:01:18.842758 read(3, "HTTP/1.1 200 OK\r\nAccess-Control-Allow-Origin: *\r\nContent-Type: application/x-javascript; charset=UTF-8\r\nDate: Sat, 19 Dec 2015 11:01:18 GMT\r\nServer: Google Frontend\r\nContent-Length: 198\r\nConnection: close\r\n\r\n{\"compiledCode\":\"alert(\\\"Failing, bad javascript\\\");$(\\\"#foo\\\").b({a:!1,c:!1});\",\"statistics\":{\"originalSize\":180,\"originalGzipSize\":163,\"compressedSize\":58,\"compressedGzipSize\":76,\"compileTime\":0}}", 1024) = 406 <0.000019>
Thanks for the report! I'll try to take a look at this tomorrow. /m
The code in the test for testing "bad javascript" is no longer an error, according to Google Closure. It's now just a warning. I've updated the test code to have properly bad javascript, so now the test passes. /m