Commit Graph

2501 Commits

Author SHA1 Message Date
lrn@google.com 4868ee2110 Remove Futures class, move methods to Future.
Optimize Future.forEach, Future.delay.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16954 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 09:46:45 +00:00
whesse@google.com e299805a91 Suppress flaky failures on standalone/io/test_runner_test (Issue 1947)
BUG=https://code.google.com/p/dart/issues/detail?id=1947

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16923 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 14:49:01 +00:00
sgjesse@google.com 6e6d7dcf35 Always set content length to 0 on redirect requests
R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16914 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 11:44:51 +00:00
kustermann@google.com 5cd8b15336 Status update: io/test_runner_test is passing + small fix in test_runner_test
Review URL: https://codereview.chromium.org//11833031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16905 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 09:30:55 +00:00
whesse@google.com 0c3bb5ba04 Fix test_runner_test which uses Timer to import dart:async.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16870 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 18:55:27 +00:00
whesse@google.com 79ddc9bfca Remove some previously flaky SecureSocket tests from the status file for Windows.
BUG=https://code.google.com/p/dart/issues/detail?id=6893

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16868 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 18:34:06 +00:00
kustermann@google.com 59a12b72c9 Migration of testing scripts in tools/ to libv2
Review URL: https://codereview.chromium.org//11817012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16867 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 18:31:28 +00:00
sgjesse@google.com 6a28c3cc61 Revert "Add onClosed callbacks to HTTP output streams"
BUG=7761

TBR=ager@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16862 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 16:19:09 +00:00
sgjesse@google.com a50ad1516d Add onClosed callbacks to HTTP output streams
The onClosed will e called after the stream is closed, but the actual
data might still be buffered internally.

BUG=dart:7761

R=ager@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16860 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 15:56:16 +00:00
whesse@google.com 7f499abb04 Fix race condition in Directory.create.
BUG=https://code.google.com/p/dart/issues/detail?id=7679

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16842 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:59:14 +00:00
ager@google.com 75c8f427cc Update remaining usages of Completer.completeException.
R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16840 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:29:39 +00:00
srdjan@google.com 8c35ce1852 Bug fix and improvements to clamped arrays.
Review URL: https://codereview.chromium.org//11794038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16774 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 00:58:58 +00:00
whesse@google.com 5f41e464bd Fix dart2js by copying keys of a map that is modified under us.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16732 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 18:02:55 +00:00
sgjesse@google.com 82e8aad8f5 Update dart2js status file
TBR=ager@google.com

Update dart2js status file

R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16724 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 16:18:58 +00:00
ahe@google.com c327fdb337 Update status file for bug 7739.
Review URL: https://codereview.chromium.org//11787021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16722 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 16:14:40 +00:00
sgjesse@google.com 0fedaeff65 Update dart2js status file
R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16721 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 16:06:04 +00:00
ager@google.com 7f328bfda6 Mark test script tests as pass, fail to suppress them on dartc as well.
R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16706 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 14:59:52 +00:00
whesse@google.com 82558a2b2e Add the remaining test scripts unit test to the status file exclusion.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16690 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 12:19:10 +00:00
ajohnsen@google.com 32eeecd930 Fix tests for VM in checked mode.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16689 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:59:49 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
sgjesse@google.com 24ed1e32bb Fix badly written test
The test closed the output stream on an HTTP response before consuming the request.

R=ager@google.com

BUG=dart:7562

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16639 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 14:41:05 +00:00
whesse@google.com 7f60b90a48 Add synchronous directory listing to dart:io Directory.
BUG=dart:4730

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16636 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 13:51:15 +00:00
ager@google.com d74a3dfcce Fix Directory.create(recursive: true) for non-existing paths.
R=sgjesse@google.com
BUG=dartbug.com/7679

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16605 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-03 16:09:46 +00:00
ager@google.com 09d44d1ebe Reapply change to enable a couple of tests that were not run because they were named incorrectly.
R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16596 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-03 10:15:14 +00:00
sgjesse@google.com 327fb685ac Revert "Enable a couple of tests that were disabled because they"
Caused tets errors on Windows

TBR=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16578 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 15:42:17 +00:00
ager@google.com 4888404631 Enable a couple of tests that were disabled because they
did not have a name ending in _test.dart.

Deleted a test that tested the arguments to readInto on
a socket input stream. readInto is being deprecated and
rewriting the test would be a waste of time.

R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16576 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 15:15:31 +00:00
sgjesse@google.com 48817020fc Rewrite test
Rewrite test string_decoder_test to use only public API. This makes
the test compile with dart2js. Also fixed a bug where an unfinished
UTF-8 sequeuce is not reported as an error.

R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16575 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 15:08:45 +00:00
sgjesse@google.com 40ff2c0a96 Improve streaming UTF-8 decoder
Decode 5 and 6 byte UTF-8.

Convert code points not supported by Dart into replacement character.

Better error checking.

Added test of some corner cases.

R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16573 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 12:38:55 +00:00
ager@google.com c31250d58b Make Platform.environment case-insensitive on Windows.
Environment variables on Windows are case-insensitive. In order
to reliably be able to test if an environment variable is set
and get its value, we therefore need to go case-insensitive.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16571 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 11:26:31 +00:00
sgjesse@google.com 80f0708255 Disable some testing on Windows while examining the problem
TBR=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16438 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 11:30:47 +00:00
ager@google.com cca955efe2 Implement toString on File and Directory objects.
R=sgjesse@google.com
BUG=dartbug.com/7552

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16436 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 11:00:56 +00:00
ager@google.com 6d0f985432 Add exitCode setter to set the exit code returned by the Dart VM
standalone binary on normal termination.

This is needed to be able to set the exit code without cutting
off pending asynchronous operations.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16435 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:36:52 +00:00
ager@google.com 695e7f7490 Fix File.writeAsString to use named optional arguments.
R=sgjesse@google.com
BUG=dartbug.com/7555

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16433 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:32:48 +00:00
sgjesse@google.com e5d693d12d Refactor handling of Transfer-Encoding
This moves more header handling to the HttpHeaders object

R=ajohnsen@google.com

TEST=tests/standalone/io/http_content_length_test.dart

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16432 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:11:05 +00:00
sgjesse@google.com 7e293aa077 Reapply "Fix URI encoding/decoding of + and space""
Updated test expectations for some tests for pkg/http, pkg/oauth2 and
pub to match the change.

TBR=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16426 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 09:50:05 +00:00
sgjesse@google.com 48822ca742 Revert "Fix URI encoding/decoding of + and space"
TBR=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16421 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 09:16:46 +00:00
sgjesse@google.com 489f68046f Fix URI encoding/decoding of + and space
The URI decoder now encodes space as + and + as %2B. Likewise the URI
decode decodes + as space (and %2B as +, but that was already the
case).

R=lrn@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16419 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 08:53:38 +00:00
floitsch@google.com 0501a2b1c2 Create a new ReceivePort for each test so they don't interfere.
Review URL: https://codereview.chromium.org//11636022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16389 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 19:29:38 +00:00
whesse@google.com ee2a8fe7d6 Add automatic initialization of SecureSocket library.
BUG=dart:7541

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16384 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 18:17:07 +00:00
sgjesse@google.com 72f2db180c Add test of setting HTTP Content-Length through headers
R=ajohnsen@google.com

TEST=tests/standalone/io/http_content_length_test.dart

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16362 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 13:05:09 +00:00
sgjesse@google.com beaf02365a Change the HTTP Content-Length handling
Move the handling of the Content-Length to the HttpHeaders
object. This makes it possible to set the Content-Length through the
headers as well as directly on HttpResponse and HttpClientRequest.

R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16357 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 08:50:00 +00:00
hausner@google.com ec0d716bdd Address Siva's and Mads' review request in debugger test
Review URL: https://codereview.chromium.org//11645025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16346 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 22:05:58 +00:00
ager@google.com 87a43bef60 Implement debugger connection on Windows.
This is a slightly cleaned up version of the code that Devon
created.

All of eventhandler and socket in bin is designed for async
communication only. Therefore, it does not make much sense
to use it for something as simple as this. I have put the
sync send and receive operations into DebuggerConnectionImpl
instead of attempting to use the async Socket::Read and
Socket::Write.

R=devoncarew@google.com,sgjesse@google.com,hausner@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16336 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 18:42:19 +00:00
hausner@google.com 1e41380676 Add basic standalone debugger test
Tests the wire protocol API to the VM debugger engine. This is a first,
basic test. Additional functionality will be added later to check the
expected value of variables, list libraries, scripts, breakpoints etc.
Review URL: https://codereview.chromium.org//11576053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16327 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 17:08:43 +00:00
sgjesse@google.com 606bfd5e96 Reapply "Fixes to eventhandler and HTTP""
This reapplies r16252 with a number of fixes.

R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16306 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 08:11:51 +00:00
srdjan@google.com 18b376a8ad Add DoubleToSmi optimistically, preventing boxing/unboxing of doubles and propagate smi-nessof the result.
Review URL: https://codereview.chromium.org//11568044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16272 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 18:43:29 +00:00
sgjesse@google.com 310225aabf Revert "Fixes to eventhandler and HTTP"
This reverts commit 21994e29d17b686d71432dfac3bc59e5f2238aa1.

TBR=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16256 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 13:21:12 +00:00
sgjesse@google.com e107943e70 Fixes to eventhandler and HTTP
1. Improve error handling in Windows event handler

Whenever an error happens on an IO operation this
generates an error event and the handle is marked as having has
an error.

The test http_shutdown_test have been fixed to check for error as well
as succesful request when the server is closing the connection due to
closing the output stream before the input have been read. The test
have also been extended to have the client send more request data to
get more errors.

2. Disable event handler events until re-enabled from Dart

When an eventhandle event is posted to Dart this event is now
disabled in the eventhandler until re-enabled from Dart.

On Linux and Mac OS this was already the case as the file
descriptor for which the event(s) was posted was removed from
epoll/kqueue when events was posted.

On Windows this is now changed so that after an event is posted
it needs to be re-enabled from Dart code like on Linux and Mac
OS.

Changed the Dart event handler code to avoid posting disabling of
the out handler as the C++ code is already doing this on all
platforms.

3. Cancel HTTP parser when a connection is closing

When a HTTP connection is closing and moved to the close queue
there should be no more envents from the HTTP parser for whatever
data is still buffered.

R=ager@google.com

BUG=7294

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16252 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 12:32:35 +00:00
scheglov@google.com ecd5c7d0bf Issue 5064. Some more 'skip' tests triage
http://code.google.com/p/dart/issues/detail?id=5064

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16227 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-17 20:39:03 +00:00
kustermann@google.com e87e99992d Enable the "skip command compilation if output is already up-to-date" feature in dart2dart
Review URL: https://codereview.chromium.org//11593008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16209 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-17 14:26:41 +00:00