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

Unified Diff: chrome/browser/policy/test/policy_testserver.py

Issue 607823002: Add a mechanism for python test server to exit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes nits Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/test/policy_testserver.py
diff --git a/chrome/browser/policy/test/policy_testserver.py b/chrome/browser/policy/test/policy_testserver.py
index d1cdb1abe100f7977cbd7cdcf1a5fb17090d3c84..a08eac10b01645ad7fbfc651423ce6dedc368146 100644
--- a/chrome/browser/policy/test/policy_testserver.py
+++ b/chrome/browser/policy/test/policy_testserver.py
@@ -229,6 +229,13 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
path = self.path if sep == -1 else self.path[:sep]
if path == '/externalpolicydata':
http_response, raw_reply = self.HandleExternalPolicyDataRequest()
+ elif path == '/configuration/test/exit':
+ # This is not part of the standard DM server protocol.
+ # This extension is added to make the test server exit gracefully
+ # when the test is complete.
+ self.server.stop = True
+ http_response = 200
+ raw_reply = 'OK'
else:
http_response = 404
raw_reply = 'Invalid path'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698