Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-contentType/support/contenttype_setter.py

Issue 1529523002: Import dom/ from web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak W3CImportExpectations Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 def main(request, response):
2 type = request.GET.first("type", None)
3 subtype = request.GET.first("subtype", None)
4 if type and subtype:
5 response.headers["Content-Type"] = type + "/" + subtype
6
7 removeContentType = request.GET.first("removeContentType", None)
8 if removeContentType:
9 try:
10 del response.headers["Content-Type"]
11 except KeyError:
12 pass
13
14 content = '<head>'
15 mimeHead = request.GET.first("mime", None);
16 if mimeHead:
17 content += '<meta http-equiv="Content-Type" content="%s; charset=utf-8"/ >' % mimeHead
18 content += "</head>"
19
20 return content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698