Skip to content

Commit

Permalink
Update GeneratedJsTestServlet to work with test files that use Closure's
Browse files Browse the repository at this point in the history
module syntax.
  • Loading branch information
jleyba committed Oct 18, 2015
1 parent 98f802a commit 1da3850
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ "<script src=\"/third_party/closure/goog/base.js\"></script>\n"
+ "<script src=\"/javascript/deps.js\"></script>\n"
+ "<script>\n"
+ " goog.addDependency('../../.." + req.getPathInfo() + "',\n"
+ " ['" + symbol + "'],\n"
+ " goog.dependencies_.requires['../../.." + req.getPathInfo() + "'] || []);\n"
+ " goog.require('" + symbol + "');\n"
+ " (function() {\n"
+ " var path = '../../.." + req.getPathInfo() + "';\n"
+ " goog.addDependency(path, ['" + symbol + "'],\n"
+ " goog.dependencies_.requires['../../.." + req.getPathInfo() + "'] || [],\n"
+ " !!goog.dependencies_.pathIsModule[path]);\n"
+ " goog.require('" + symbol + "');\n"
+ " })()\n"
+ "</script></head><body></body></html>").getBytes(Charsets.UTF_8);

resp.setStatus(HttpServletResponse.SC_OK);
Expand Down

0 comments on commit 1da3850

Please sign in to comment.