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

Unified Diff: chrome/test/functional/ispy/server/image_handler.py

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/functional/ispy/server/image_handler.py
===================================================================
--- chrome/test/functional/ispy/server/image_handler.py (revision 261231)
+++ chrome/test/functional/ispy/server/image_handler.py (working copy)
@@ -1,38 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Request handler to display an image from Google Cloud Storage."""
-
-import json
-import os
-import sys
-import webapp2
-
-from common import cloud_bucket
-from common import constants
-
-import gs_bucket
-
-
-class ImageHandler(webapp2.RequestHandler):
- """A request handler to avoid the Same-Origin problem in the debug view."""
-
- def get(self):
- """Handles get requests to the ImageHandler.
-
- GET Parameters:
- file_path: A path to an image resource in Google Cloud Storage.
- """
- file_path = self.request.get('file_path')
- if not file_path:
- self.error(404)
- return
- bucket = gs_bucket.GoogleCloudStorageBucket(constants.BUCKET)
- try:
- image = bucket.DownloadFile(file_path)
- except cloud_bucket.FileNotFoundError:
- self.error(404)
- else:
- self.response.headers['Content-Type'] = 'image/png'
- self.response.out.write(image)
« no previous file with comments | « chrome/test/functional/ispy/server/gs_bucket.py ('k') | chrome/test/functional/ispy/server/main_view_handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698