Commit Graph

2501 Commits

Author SHA1 Message Date
whesse@google.com 507c2b67c7 Fix secure socket tests to close sockets after writing. Fix handling of close events in TlsSocket class.
BUG=

Review URL: https://codereview.chromium.org//11417116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15265 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 15:45:54 +00:00
erikcorry@google.com 359736e97a Fix Unicode issues in dart2js and dart2dart.
R=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//11418115

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15254 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:51:14 +00:00
hausner@google.com abfdec2880 Eliminate explicit abstract from class members in tests
Review URL: https://codereview.chromium.org//11415105

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15220 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 20:12:53 +00:00
srdjan@google.com ed9febae47 Mysterious failure on Windows, disabled until communicated with interested parties.
Review URL: https://codereview.chromium.org//11411114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15190 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 01:27:37 +00:00
whesse@google.com 53664ced83 Fix typo in type name in test: string -> String.
BUG=

Review URL: https://codereview.chromium.org//11411098

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15167 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 18:13:41 +00:00
whesse@google.com 961699f924 Working tls server sockets.
Add is_server parameter to _TlsSocket, pass it through to _TlsFilterImpl.connect.

Add TlsServerSocket class.

BUG=

Review URL: https://codereview.chromium.org//11414009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15163 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 17:45:18 +00:00
erikcorry@google.com 84da84c22d Revert "Add some support for the code-point code-unit distinction."
This reverts commit r15150

R=karlklose@google.com
BUG=

Review URL: https://codereview.chromium.org//11411092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com 547cbf9da6 Add some support for the code-point code-unit distinction.
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.

R=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//11368138

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +00:00
ager@google.com e04d4d03c6 Add utility methods to write the contents of a file as one operation.
We already have them for reading and it makes sense to have them for
writing as well.

We should update the positional arguments in the dart:io library to be
named optional arguments. I'd like to do that in a separate patch.

R=sgjesse@google.com
BUG=dartbug.com/4798

Review URL: https://codereview.chromium.org//11316102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15149 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 13:47:13 +00:00
sgjesse@google.com 127e648385 Change the HTTP close handling
Whenever the client closes its connection the server will follow and
close as well.

R=ager@google.com

BUG=dart:4652

Review URL: https://codereview.chromium.org//11316080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15135 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 08:20:37 +00:00
kustermann@google.com 52077af7fa Revert "Added support for skipping redundant dart2js compilations."
We must disable this feature until we've made sure that the boolean
dart2js flags (e.g. --checked) are included in the directory names.

TBR=ahe

Review URL: https://codereview.chromium.org//11280061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15087 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 15:47:59 +00:00
kustermann@google.com 9bec818a88 Fixed test from r15080: use readAsStringSync instead of readAsTextSync
TBR=ricow@google.com

Review URL: https://codereview.chromium.org//11419066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15084 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 14:22:33 +00:00
kustermann@google.com f4bc6a5f3f Added support for skipping redundant dart2js compilations.
Currently, the buildbots run tests on every commit. But often neither
the tests nor the dart2js compiler did change (e.g. on status file updates).

The added code will check if the dependencies (i.e. files listed in
test.js.deps) or the dart2js snapshot did change. If not, the output
of the previous dart2js compilation is up to date and the compilation
step is skipped.
The skipping of redundant dart2js compilations works only if the '--use-sdk'
option was specified (because in this case the dart2js snapshot is used).

Review URL: https://codereview.chromium.org//11369216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15080 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 13:56:11 +00:00
ager@google.com 1dbae46f37 Remove non-ascii file names from repo and generate them in tests instead.
R=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//11316077

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15073 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 12:26:42 +00:00
ahe@google.com f4ca9548c9 Allow tests to specify a package root.
Use a shared package root if none is specified.

Committed: https://code.google.com/p/dart/source/detail?r=15064

Review URL: https://codereview.chromium.org//11359187

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15070 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 11:35:57 +00:00
sgjesse@google.com 6e09071a58 Make HTTP server close sockets when closed in idle state
If a connection was in the idle state and the socket was closed by the
client the server did close the connection. This caused the server to
quickly run out of resources. There was a state check missing after a
state change.

Added a COSING state as well and a way to get the number of
connections if various states.

R=ager@google.com, ajohnsen@google.com

BUG=

Review URL: https://codereview.chromium.org//11348127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15069 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 11:11:00 +00:00
ahe@google.com 88a921030d Revert "Allow tests to specify a package root."
Revert "Add dependencies for bots that doesn't build everything."

This reverts r15066 and r15064.

Review URL: https://codereview.chromium.org//11414055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15068 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 10:42:55 +00:00
ahe@google.com 89cc5a2d23 Allow tests to specify a package root.
Use a shared package root if none is specified.

Review URL: https://codereview.chromium.org//11359187

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15064 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 09:51:17 +00:00
ager@google.com 3fb41705e5 Rename File.readAsText to File.readAsString. There is no Text type in Dart
and the methods return Strings.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11412033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15011 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 13:10:15 +00:00
kustermann@google.com 42b89c9f77 Changed: TestCase.output -> TestCase.commandOutputs[]
Currently the TestCase has exactly one TestOutput. This worked
until now, since we were only interested in the output of the
last command.

This change introduces one CommandOutput for each command which
has been run. Doing so enables us to fetch output (stdin,stderr)
information as well as exitCode ... for all commands.

See also 11293278.

Review URL: https://codereview.chromium.org//11348088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15006 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 11:17:47 +00:00
sgjesse@google.com a3a87134b0 Fix checeked mode errors in previous commits
TBR=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11299031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15004 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 10:17:39 +00:00
sgjesse@google.com cf01064d80 Refactor the HTTP parser to collect headers
The headers are now collected directly in the HTTP parser instead of
it emitting events for each header line parsed. One event (request or
response) is now emitted when the full header is parsed.

Had to move the HTTP header object implementation for this change.

Also included a changing the request/response state constants to
static constants instead of final fields.

R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11415027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15002 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 09:42:36 +00:00
kustermann@google.com 3dc5c7056a Revert of commit 14947
Review URL: https://codereview.chromium.org//11348060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14949 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 09:15:43 +00:00
kustermann@google.com 5ec78286df Changed: TestCase.output -> TestCase.commandOutputs[]
Currently the TestCase has exactly one TestOutput. This worked
until now, since we were only interested in the output of the
last command.

This change introduces one CommandOutput for each command which
has been run. Doing so enables us to fetch output (stdin,stderr)
information as well as exitCode ... for all commands.

Review URL: https://codereview.chromium.org//11293278

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14947 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 09:05:41 +00:00
ricow@google.com 97e7fac4d7 Suppress timeout in tls test. The test should be fixed, see issue 6730
Review URL: https://codereview.chromium.org//11413006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14945 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 08:24:27 +00:00
whesse@google.com 9dfdb4850c Add a TlsSocket class to dart:io, that implements secure client sockets using TLS (SSL).
This uses the NSS (Network Security Services) libraries from Mozilla, which is a cross-platform library for SSL and TLS sockets.  We use the patched version from the Chromium repository, which is checked into third_party by the DEPS file.

Review URL: https://codereview.chromium.org//10916081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14893 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:38:32 +00:00
ager@google.com 0d6f09f724 Update status file with information about tests that pass on newer
versions of MacOS but fail on the buildbot.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11365254

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14892 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:38:01 +00:00
ager@google.com de1e738408 Fix file test to test for both decomposed and precomposed utf16
form. MacOS system calls gives you the decomposed form and the
VM strings are in the precomposed form.

Attempt to enable the process too which does not fail on my machine.
I'd like to have a look at the failure on the buildbot to diagnose
if it still fails.

R=sgjesse@google.com
BUG=dartbug.com/6702

Review URL: https://codereview.chromium.org//11364232

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14891 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:27:22 +00:00
sgjesse@google.com cde0bb06dd Add support for non ASCII strings when communicating with native ports
The string representation in a Dart_CObject strructure is now
UTF8. All strings read are now converted to UTF8 from either ASCII or
UTF16 serialization. All strings posted should be valid UTF8 and are
serialized as either ASCII or UTF16 depending on the content.

Proper andling of surrogate pairs is missing, but will be added when
https://codereview.chromium.org/11368138/ lands.

R=ager@google.com, erikcorry@google.com, asiva@google.com

BUG=

Review URL: https://codereview.chromium.org//11410032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14887 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:01:57 +00:00
ager@google.com b9438f9a1c Update status file for dart2js
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11293251

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14854 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 15:39:09 +00:00
ager@google.com 31d840a267 D'oh! Add the last suppression as well.
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11359180

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14853 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 15:25:38 +00:00
ager@google.com 1764a9fd2c Add failures to status files
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11362227

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14852 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 15:22:14 +00:00
ager@google.com 28b43144e5 Update dart:io to convert strings between UTF8 and current code page
when interacting with the system.

What we get from and need to hand to the VM is utf8. What we
get from and need to hand to the system is in the current
code page.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11275281

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14851 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 15:03:23 +00:00
lrn@google.com 87eec0ef1f Revert "Exception no longer an interface."
Broke more than expected.

TBR=floitsch@google.com

Review URL: https://codereview.chromium.org//11364216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14848 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 14:04:19 +00:00
lrn@google.com def3ee60a5 Exception no longer an interface.
Some tests disabled due to dartbug.com/6697

Review URL: https://codereview.chromium.org//11365226

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14847 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 13:42:51 +00:00
sgjesse@google.com c27bd8bb28 Refactoring of the HTTP library
Better state handling: On both server and client the state of the
connection is tracked. This goes for both the HTTP
request/response state (idle, active, done) and the socket
state (open, read closed, write closed).

Simplified the socket event handling: All socket onData, onClosed
and onError events go directly to the HTTP parser. The HTTP
connection only receives events from the HTTP parser now.

Better close handling: A close queue have been added where
sockets which should be closed are added. When in the close queue
the socket will be closed when either all data from the output
stream are written or an error occours.

Changed the HTTP parser to parse either requests or responses.

Removed the null-checks in the HTTP parser for whether the
callbacks where set. The HTTP parser is only used internally and
we always set all callbacks.

Whether it fixes the bugs listed below still needs to be verified
through thorough testing on all platforms. However the code should be
in much better shape from this refactoring.

R=ager@google.com

BUG=dart:6393, dart:6521, dart:6594

Review URL: https://codereview.chromium.org//11410003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14840 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 11:19:59 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

Review URL: https://codereview.chromium.org//11365196

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
hausner@google.com 959f9ab4c4 More function literal changes in tests.
Review URL: https://codereview.chromium.org//11363206

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14816 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:57:39 +00:00
floitsch@google.com 8e6f238f86 a === b -> identical(a, b)
Replace === null with == null.

BUG=http://dartbug.com/6380

Review URL: https://codereview.chromium.org//11361190

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +00:00
sgjesse@google.com df4eaf9944 Fix multiple onRequest callbacks during redirect.
R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11366169

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14727 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 09:45:49 +00:00
ager@google.com d606671010 Update status file to reflect the flaky status of http_basic_test.
R=ricow@google.com,sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11369149

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14724 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 08:54:15 +00:00
sgjesse@google.com cce280a37d Use Socket.read instead of Socket.readList in HTTP
R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11359101

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14677 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 09:56:22 +00:00
rnystrom@google.com d55ee43c0e Don't crash when decoding astral plane UTF-8.
Review URL: https://codereview.chromium.org//11364115

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14639 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 17:27:33 +00:00
sgjesse@google.com 94c3dabf84 Refactor HTTP parser to hold current buffer
The HTTP parser now stores the current buffer internally. This change
is to prepare for stopping the parser when a request have been
received and resuming parsing when this response have been fully
processed.

R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11359085

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14623 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 13:58:24 +00:00
ager@google.com fa0afc3c45 Reenable http_proxy_test on Windows. This was another version dartbug.com/6521.
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11359084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14621 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 12:45:52 +00:00
ager@google.com 2796ab99c2 Do *not* report connection reset by peer as an error on an http server
when no request is in progress.

Instead treat it as a normal close of the connection. This error was
introduced yesterday when getting rid of the connection memory
leak. Handling the connection errors as a normal close still makes
sure to clean up so we do not leak memory.

R=sgjesse@google.com
BUG=dartbug.com/6585

Review URL: https://codereview.chromium.org//11364122

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14617 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 11:01:49 +00:00
ager@google.com 719b6e8224 Update status files with current flakes and bug numbers.
We will be investigating these today.

R=ricow@google.com,sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11361146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14615 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 09:19:45 +00:00
ager@google.com b61bebe636 Allow Directory.create to create all missing path components.
Unified Directory.create/list/delete to take a named 'recursive'
argument.

Fixed bug in Path implementation on Windows.

R=sgjesse@google.com
BUG=dartbug.com/6024

Review URL: https://codereview.chromium.org//11364097

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14572 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 15:00:54 +00:00
sgjesse@google.com d83354b83d Keep track of the request and response state in the HTTP client connection
In a HTTP client connection it is possible for the response to end
before the request has been fully sent. This situation was not handled
correctly. Now the HTTP client connection keeps track of the state of
both request and response and doen not end the client connection
before both are done.

R=ager@google.com

BUG=dart:6521

Review URL: https://codereview.chromium.org//11361119

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14559 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 11:28:19 +00:00
ajohnsen@google.com 796e4b3400 Changed DARTSESSID's httpOnly property to true by default.
BUG=6516

Review URL: https://codereview.chromium.org//11361090

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14514 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 09:23:55 +00:00