whesse@google.com
c5d1431241
Add Path class to dart:io, add tests for it to standalone/io.
...
Just a preliminary implementation - make suggestions for changes.
BUG=
TEST=standalone/io/path_test
Review URL: https://chromiumcodereview.appspot.com//10417053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8909 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 15:21:01 +00:00
floitsch@google.com
a51dc25968
Make isUtc a getter, change some method names in Date. Weekday is now 1 based.
...
isUtc is now a getter.
Date.hours -> Date.hour
Date.minutes -> Date.minute
Date.seconds -> Date.second
Date.milliseconds -> Date.millisecond
Date.fromEpoch -> Date.fromMillisecondsSinceEpoch
Date.value -> Date.millisecondsSinceEpoch
Date.MON == 1 (up to Date.SUN == 7).
Fixes issue 3444, 1985.
Review URL: https://chromiumcodereview.appspot.com//10538105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8899 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:43:46 +00:00
whesse@google.com
b8e4ca3a3e
Revert "Test infrastructure: Change the intentionally crashing process_test.cc, to try and avoid timeout of this process."
...
This reverts commit 51bfb317ef687e8457ce6bccb21f022d4b21ea74.
BUG=
TEST=standalone/io/process_segfault_test
Review URL: https://chromiumcodereview.appspot.com//10544207
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8797 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 14:16:00 +00:00
whesse@google.com
2c0463fbd6
Test infrastructure: Change the intentionally crashing process_test.cc, to try and avoid timeout of this process.
...
BUG=1947
TEST=standalone/io/test_runner_test
Review URL: https://chromiumcodereview.appspot.com//10532190
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8795 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 13:56:21 +00:00
sethladd@google.com
7ea77891bb
specify which version of web sockets
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10535168
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8666 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 16:08:51 +00:00
whesse@google.com
91982e8d76
Close a _FileInputStream only immediately before onClosed is called, so .closed returns false before that.
...
BUG=
TEST=standalone/io/file_test
Review URL: https://chromiumcodereview.appspot.com//10536168
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8649 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 11:48:02 +00:00
whesse@google.com
99cbf6de81
Add test for buffered file input stream on dart:io File class.
...
BUG=
TEST=standalone/io/file_test
Review URL: https://chromiumcodereview.appspot.com//10544134
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8643 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 08:36:29 +00:00
asiva@google.com
c7f58add4c
Fix for issue-2837 (allow --print-flags without a script name).
...
Review URL: https://chromiumcodereview.appspot.com//10548017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8622 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 17:48:47 +00:00
hausner@google.com
a1cb082925
Add API to configure debugger pause on exception
...
Still to be done: proper determination whether an exception is
handled or unhandled. We still assume that TypeError and AssertionError
exceptions are unhanded.
Review URL: https://chromiumcodereview.appspot.com//10540121
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8579 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:56:50 +00:00
whesse@google.com
c914f33159
Make sure that _FileInputStream._fillBuffer is not entered again before it finishes.
...
Also fix a bug where _fillBuffer did not reset _position correctly.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10533110
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8553 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 16:06:12 +00:00
whesse@google.com
2d68705170
Fix file buffering code that uses RemoveRange on a fixed-length Uint8 array.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10544110
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8548 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 14:00:06 +00:00
ajohnsen@google.com
c54800f942
Give Process.kill an optional argument to specify which signal to send.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10545134
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8541 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:00:50 +00:00
whesse@google.com
31f1777851
Add buffering to _FileInputStream implementation.
...
Revert "Revert dart:io file InputStream buffering to fix bugs in it."
Recommits r8435, r8401, r8396, r8395, with additional fixes.
BUG=3434
TEST=
Review URL: https://chromiumcodereview.appspot.com//10542102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8537 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:55:51 +00:00
ager@google.com
a0c90242b8
Add missing closed check to random access file.
...
R=iposva@google.com
BUG=
TEST=standalone/io/file_error_test
Review URL: https://chromiumcodereview.appspot.com//10536112
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8525 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 07:28:29 +00:00
whesse@google.com
20725c01d8
Enable standalone/io/http_test, splitting it into three separate tests.
...
This allows better reporting and diagnosis of flakiness.
Also fixed some type and interface issues that created type warnings in http tests.
BUG=2987
TEST=standalone/io/http_test, http_advanced_test, http_read_test, http_basic_test
Review URL: https://chromiumcodereview.appspot.com//10533078
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8491 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 15:09:54 +00:00
hausner@google.com
eebec2a081
Debugger break on TypeError, AssertionError
...
Add debugger functionality to pause the VM whenever a TypeError
or AssertionError exception happens.
This is a first step towards breaking on handled and unhanded
exceptions in general. We first need to generate more debug info
for catch handlers so we can determine whether an exception will
be handled or not before we unwind the stack to run the catch
clauses.
Review URL: https://chromiumcodereview.appspot.com//10537065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8457 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:51:50 +00:00
whesse@google.com
118a9ad7e7
Revert dart:io file InputStream buffering to fix bugs in it. Reverts r8435, r8401, r8396, r8395.
...
BUG=dart:3450, dart:3434
TEST=
Review URL: https://chromiumcodereview.appspot.com//10537077
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8441 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 14:39:02 +00:00
whesse@google.com
842194bd39
Fix dart:io File.openInputStream input stream to cancel outstanding onData events when EOF reached.
...
BUG=
TEST=standalone/io/file_test
Review URL: https://chromiumcodereview.appspot.com//10543078
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8435 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 12:05:53 +00:00
sgjesse@google.com
b5995d1d9b
Add method flush to output stream
...
R=ager@google.com
BUG=dart:1407
TEST=tests/standalone/src/io/FileOutputStreamTest.dart
Review URL: https://chromiumcodereview.appspot.com//9969202
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8422 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 07:56:15 +00:00
whesse@google.com
ada680e28f
Change FileInputStream to only call onClosed callback when underlying file has been closed. Change standalone/io/file_test to check this.
...
TBR=ricow@google.com
BUG=
TEST=standalone/io/file_test
Review URL: https://chromiumcodereview.appspot.com//10546051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8401 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 16:43:41 +00:00
whesse@google.com
4b1c96b722
Remove erroneous assert from dart:io's File class.
...
BUG=
TEST=standalone/io/file_test.dart
Review URL: https://chromiumcodereview.appspot.com//10537053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8396 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 14:23:16 +00:00
whesse@google.com
b939ba1480
Add buffering to File.openInputStream, so that the entire file is not read in at once.
...
BUG=dart:3334
TEST=
Review URL: https://chromiumcodereview.appspot.com//10536029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8395 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 13:44:31 +00:00
fschneider@google.com
84027c4457
Add flow graph printing into a .cfg file with flag --print-flow-graph-file.
...
This CL adds a flag --print-flow-graph-file which produces one
.cfg-file per isolate when enabled. Currently it prints the final
flow graph before code generation.
I also added SuccessorAt and SuccessorCount to allow easy iteration
over the successors of a basic block.
Review URL: https://chromiumcodereview.appspot.com//10446116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8322 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 11:09:02 +00:00
ajohnsen@google.com
83bcc58918
Close stdin in Process.run.
...
This fixes an open pipe issue.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10532024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8321 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 10:46:30 +00:00
hausner@google.com
ba8c73df3a
Fix handling of long JSON messages
...
Fix Debugger wire protocol for long messages.
Add a stress mode in the protocol handler to break messages
into small pieces.
Review URL: https://chromiumcodereview.appspot.com//10515015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8269 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-04 22:27:50 +00:00
hausner@google.com
c39f48340d
Add string encoding to wire protocol
...
Also, add command to retrieve the source text of a given script.
Review URL: https://chromiumcodereview.appspot.com//10496006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8220 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-02 00:07:12 +00:00
asiva@google.com
6ce890f75a
1. Restructure some of the builtin library processing code.
...
Review URL: https://chromiumcodereview.appspot.com//10388242
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8175 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 21:09:17 +00:00
ager@google.com
501a0dd907
Add test that passes invalid arguments to socket methods and fix
...
issues encountered.
The fuzzing is not as systematic as for some of the other
APIs. However, a lot of checking is going on in the Dart code so
forcing issues required a bit of work making objects act like lists
and integers.
Additionally, fix a memory leak in process implementation.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10441078
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8088 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 08:17:25 +00:00
hausner@google.com
eeaa660d52
Introduce library ids and info in the wire protocol
...
- Library hierarchy (imports, prefixes)
- Global (top-level) variables
- Removing breakpoints
Review URL: https://chromiumcodereview.appspot.com//10447045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8075 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 19:51:51 +00:00
sgjesse@google.com
2f1cd20085
Small HTTP server fixes
...
Make empty responses use content length instead of chunked.
Make the default error handler indicate no content for HTTP 1.1 as well as HTTP 1.0.
Remove unneeded null check.
R=ager@google.com
BUG=none
TEST=HTTP tests
Review URL: https://chromiumcodereview.appspot.com//10454051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8044 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 09:31:32 +00:00
ajohnsen@google.com
7fa410694b
Mark the vm_tests as a RunTime score.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10446056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8033 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 07:26:03 +00:00
ager@google.com
eb9744b3bb
Process exit code handling reworked for Windows.
...
Simplify the code by relying on the builtin Windows thread pool
to wait for all process handles. The additional benefit is that
we can have an arbitrary number of processes and are not restricted
by the max number of handles for WaitForMultipleObjects.
R=sgjesse@google.com
BUG=dartbug:1450
TEST=standalone/io/process_many_test.dart
Review URL: https://chromiumcodereview.appspot.com//10440044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7995 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 13:10:03 +00:00
ager@google.com
26f0de69b0
Use Dart_New to construct OSError objects instead of the static
...
method workaround.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10443029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7994 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 13:02:47 +00:00
sgjesse@google.com
c0f4bf9672
Implement a MIME multipart parser
...
Added a MIME multipart parser with tests.
The parser is currently not used but will be used to handle form
posts with content type multipart/form-data.
R=ager@google.com , ajohnsen@google.com
BUG=dart:2488
TEST=tests/standalone/io/mime_multipart_parser_test.dart
Review URL: https://chromiumcodereview.appspot.com//10441021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7990 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 11:57:02 +00:00
sgjesse@google.com
db539915e9
Support using the HEAD request in the HTTP library
...
There was a number of issues in relation to using the HTTP method HEAD
* The HTTP parser did not parse HEAD correctly
* HEAD respoonse could not have a content length and empty body
* The client could not receive a HEAD response with content length an empty body
I the server we support writing to the output stream when replying to a head request.
They should now be fixed and a test for HEAD have been added
R=ager@google.com
BUG=dart:3205
TEST=tests/standalone/io/http_head_test.dart, tests/standalone/io/http_parser_test.dart
Review URL: https://chromiumcodereview.appspot.com//10449020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7986 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 10:13:05 +00:00
ager@google.com
379695ee2b
Implement File.lastModified.
...
R=sgjesse@google.com ,ajohnsen@google.com
BUG=dartbug/2988
TEST=standalone/io/file*
Review URL: https://chromiumcodereview.appspot.com//10443008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7945 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 13:10:02 +00:00
sgjesse@google.com
5a08f212a2
Support for cookies in the HTTP library
...
This change adds the list field cookies to all requests and
responses.
For HttpRequest the cookie list will have all the cookies set by
the client in its HttpClientRequest cookie list. These cookies
are passed through the "Cookie" HTTP header.
For HttpClientResponse the cookie list will have all the cookies
set by the server in the HttpResponse cookie list. These cookies
are passed through the "Set-Cookie" HTTP header.
The parsing of the "Cookie" and "Set-Cookie" headers try to
follow RFC 6265.
This change does not add a cookie jar in the http client with
cookie policy for automatic cookie handling.
R=ager@google.com , ajohnsen@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10414076
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7943 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 13:03:31 +00:00
turnidge@google.com
05b5d44b0e
spawnUri. Take two. This time I'll wait for Anton before committing :-).
...
See original change 7756 for description.
Review URL: https://chromiumcodereview.appspot.com//10407042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7917 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 18:32:51 +00:00
floitsch@google.com
a88e304d29
Deprecate use of timezones.
...
Review URL: https://chromiumcodereview.appspot.com//10411057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7911 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 16:07:35 +00:00
ager@google.com
6b503da4f9
Fuzzing of dart:io Directory API.
...
Uncovered one issue where an usupported value was posted back
through a native port on a failed directory listing operation.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10408060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7894 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 08:22:09 +00:00
hausner@google.com
b00ae2d1a0
Introduce remote objects in Debugger protocol
...
Review URL: https://chromiumcodereview.appspot.com//10407071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7864 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 18:06:34 +00:00
sgjesse@google.com
7d9ff0d503
Add special handling of the content type HTTP header
...
This adds parsing of HTTP headers of the form:
Name=value; parameter1=value1; parameter2=value2
Specialize the implemented header value class into a content type
class.
One could argue whether the "synchronization" between the string
representation and the content type object representation is the best
way, but if the exposed parameters map should just be the standard map
implementation there is no way of detection changes,
R=ager@google.com , ajohnsen@google.com
BUG=dart:2045
TEST=tests/standalone/io/http_test.dart, tests/standalone/io/http_headers_test.dart
Review URL: https://chromiumcodereview.appspot.com//10407002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7851 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 12:53:35 +00:00
ager@google.com
0d58bde8be
Add support for directory renaming to dart:io.
...
R=sgjesse@google.com
BUG=dartbug:3104
TEST=standalone/io/directory*
Review URL: https://chromiumcodereview.appspot.com//10414046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7848 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 12:46:25 +00:00
sgjesse@google.com
4bb90d88d5
Make the Dart standalone VM run on Windows XP
...
Removed another use of inet_ntop.
R=ager@google.com
BUG=dart:3164
TEST=Most socket tests in tests/standalone/io
Review URL: https://chromiumcodereview.appspot.com//10411069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7847 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 11:56:38 +00:00
sgjesse@google.com
2eb76caab4
Add support for websocket PING and PONG frames
...
The handling of control frames have been refactored to uniformly
hanlde CLOSE, PING and PONG frames.
Currently this is not tested as I have bot found a good way to test it
yet. It has been somewhat tested with a browser client forcing ping
messages from the server and processing the pong responses from the
browser.
R=ager@google.com , ajohnsen@google.com
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com//10392195
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7844 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 10:34:47 +00:00
ager@google.com
169e2ae549
Finish file 'fuzzer' and fix issues.
...
- One integer extraction issue.
- Changed to using nativeport.call().transform to make sure that exceptions during the processing of the reply are propagated to the future.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10411053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7843 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 09:52:36 +00:00
sgjesse@google.com
2571ceeca8
Make standalone Dart VM run on Windows XP
...
Use the function WSAAddressToString for converting an IP address to a string
instead of inet_ntop. WSAAddressToString is available on Windows XP.
R=ager@google.com
BUG=dart:2559
TEST=tests\standalone\io\socket_info_test.dart
Review URL: https://chromiumcodereview.appspot.com//10409051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7797 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 13:31:01 +00:00
ager@google.com
4883bce0ae
Remove reference to onError from file API docs.
...
onError was removed when transitioning to futures.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10387212
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7792 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 11:00:05 +00:00
ager@google.com
a47410bbed
Reland: Add more API fuzzing and fix the issues encountered.
...
Only change from original code review is the closing of files
opened in the test.
- Fixed integer checks in a couple of places.
- Added closed checks to async operations.
More changes like this coming but I'm splitting the work up to not
make the review too large.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10414021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7790 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 10:52:01 +00:00
gram@google.com
45d0e6e824
URI encoder/decoder - copied from other repo. This is the same code already reviewed but the other repo is not allowing me to commit so trying again.
...
See Issue 10310080: Added uriEncode/uriEncodeComponent/uriDecode/uriDecodeComponent functions.
Review URL: https://chromiumcodereview.appspot.com//10399077
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7758 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:39:18 +00:00