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

Side by Side Diff: pkg/intl/test/start_web_server.dart

Issue 10959002: Read locales over http in the browser (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /**
6 * This file starts a trivial HTTP server to serve locale data files. We start
7 * it as a separate process, then terminate so that the test can continue to
8 * run. See web_server.dart for more information.
9 */
10
11 #import("dart:io");
12 #import("dart:isolate");
13
14 main() {
15 // TODO(alanknight): This uses nohup and & to stop the child process from
16 // stopping when we exit. This won't work on Windows.
17 var p = Process.start(
18 "nohup",
19 [new Options().executable, "pkg/intl/test/web_server.dart", "&"]);
20 p.onExit = (p) => print("Exited abnormally with exit code: $p");
21 // Give the other process a moment to fully start, and give us a meaningful
22 // exit code if there's an abnormal exit, before we finish.
23 new Timer(1000, (t) => exit(0));
Emily Fortuna 2012/09/20 23:07:19 Perhaps if we find ourselves doing more of these s
Alan Knight 2012/09/20 23:29:59 Yes. This is pretty ugly. The delay isn't necessar
Mads Ager (google) 2012/10/01 14:28:08 You actually have the hooks to wait for the proces
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698