Changeset 90411 in webkit
- Timestamp:
- Jul 5, 2011 3:54:50 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90410 r90411 1 2011-07-05 Adam Barth <abarth@webkit.org> 2 3 Add basic ajax support to garden-o-matic 4 https://bugs.webkit.org/show_bug.cgi?id=63874 5 6 Reviewed by Eric Seidel. 7 8 This patch adds some basic infrastructure to garden-o-matic. 9 Currently, the infrastructure is just used to make the "quit" command 10 use Ajax, but in the future, this infrastructure will be used to do 11 more sophistocated remote proceedure calls. 12 13 * Scripts/webkitpy/tool/servers/data/gardeningserver/index.html: 14 * Scripts/webkitpy/tool/servers/data/gardeningserver/main.js: Added. 15 * Scripts/webkitpy/tool/servers/gardeningserver.py: 16 * Scripts/webkitpy/tool/servers/reflectionhandler.py: 17 1 18 2011-07-05 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/index.html
r90410 r90411 1 <h1>Hello, world!</h1> 2 <a href="/quitquitquit">Quit</a> 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Garden-O-Matic</title> 5 <style> 6 body { 7 margin: 0; 8 padding: 0px; 9 } 10 h1 { 11 margin: 0px; 12 padding: 3px; 13 background-color: #EFF5FB; 14 } 15 .butterbar { 16 width: 500px; 17 margin-left: -250px; 18 position: fixed; 19 border-radius: 5px; 20 top: 1px; 21 left: 50%; 22 padding: 3px; 23 background-color: #F5F6CE; 24 } 25 .butterbar .hide { 26 float: right; 27 } 28 </style> 29 </head> 30 <body> 31 <div class="butterbar"><span class="status">Loading...</span> <a class="hide" href="#">Dismiss</a></div> 32 <h1>Garden-O-Matic</h1> 33 <ul> 34 <li><button class="quit">Quit</button></li> 35 </ul> 36 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 37 <script src="main.js"></script> 38 </body> 39 </html> -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
r90410 r90411 38 38 STATIC_FILE_NAMES = frozenset([ 39 39 "index.html", 40 "main.js", 40 41 ]) 41 42 -
trunk/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
r90337 r90411 80 80 81 81 def quitquitquit(self): 82 self._serve_text("Server quit.\n") 83 # Shutdown has to happen on another thread from the server's thread, 84 # otherwise there's a deadlock 85 threading.Thread(target=lambda: self.server.shutdown()).start() 86 87 def _serve_text(self, html): 82 88 self.send_response(200) 83 89 self.send_header("Content-type", "text/plain") 84 90 self.end_headers() 85 self.wfile.write("Quit.\n") 86 87 # Shutdown has to happen on another thread from the server's thread, 88 # otherwise there's a deadlock 89 threading.Thread(target=lambda: self.server.shutdown()).start() 91 self.wfile.write(html) 90 92 91 93 def _serve_json(self, json):
Note: See TracChangeset
for help on using the changeset viewer.