Commit Graph

68 Commits

Author SHA1 Message Date
Liam Appelbe 7df1498352 [nnbd/libs] Fixing more strong mode tests
Change-Id: I5c9080ed75112479ddbeaf6485a5beab3bcb2717
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142209
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-04-03 17:30:09 +00:00
Jonas Termansen 3433d8cfc3 [nnbd] Migrate standalone/io to NNBD.
The tests are also now dartfmt.

Bug: https://github.com/dart-lang/sdk/issues/40040
Change-Id: I8dece8097b37b70d47a5374dae2f3fadb0fc4b90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134338
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-07 14:41:36 +00:00
Siva Annamalai bc4860b0cb Most VM specific tests in standalone have been moved to standalone_2 and are being run in the regular bot tests. These tests are for VM functionality like io, process API etc. and have no strong mode implications. Currently we are running these tests twice once from standalone and once from standalone_2.
This CL removes these redundant tests from the standalone directory.

Bug:
Change-Id: Ib0adfa67fffa4de486e847698e18353fb4dd8a46
Reviewed-on: https://dart-review.googlesource.com/18429
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-07 23:00:00 +00:00
William Hesse 7bf2788bcc Restore all deleted tests to tests/standalone from migration to standalone_2
We are no longer deleting tests from the Dart 1 test directories when we
add them to the _2 directories. This reverts the part of change
https://dart-review.googlesource.com/c/sdk/+/12240 that modifies
the tests/standlone directory.
Bug:
Change-Id: Ie26b185234d0d18736a2fa13b77c5fd42cbb7e92
Reviewed-on: https://dart-review.googlesource.com/12287
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com>
2017-10-09 10:46:55 +00:00
Siva Annamalai bd2a8e1d60 Reland migrate most of the tests in standalone to be strong mode clean and move them to standalone_2 directory.
Bug:
Change-Id: I4ca50f315361422db1d4356055862463bfe1d6f3
Reviewed-on: https://dart-review.googlesource.com/12240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-07 01:29:36 +00:00
Siva Annamalai ff32187145 Revert "Migrate most of the tests in standalone to be strong mode clean and move"
This reverts commit c85563f582.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Migrate most of the tests in standalone to be strong mode clean and move
> them to standalone_2 directory.
> 
> Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
> Reviewed-on: https://dart-review.googlesource.com/6080
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,asiva@google.com

Change-Id: I3c7b6081f17fca45e7828603538f50d06417e2be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/12020
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-06 17:24:20 +00:00
Siva Annamalai c85563f582 Migrate most of the tests in standalone to be strong mode clean and move
them to standalone_2 directory.

Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
Reviewed-on: https://dart-review.googlesource.com/6080
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-10-06 17:07:34 +00:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Kevin Moore 5b5312a67c pkg/analyzer: support latest pkg/crypto version
BUG= https://github.com/dart-lang/sdk/issues/26138
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org/1890973003 .
2016-04-15 10:00:24 -07:00
Zachary Anderson e2729705ff Rolls back fix of SecurityContext method names.
R=iposva@google.com

Review URL: https://codereview.chromium.org/1757453002 .
2016-03-01 10:34:15 -08:00
Zachary Anderson 2cf6405ca9 Adds SecurityContext.setTrustedCertificatesBytes
Implements SecurityContext.setTrustedCertificates in terms of the new
function. This requires setTrustedCertificates to return a Future,
and removing the `directory` named argument as it is not possible to
implement with BoringSSL without blocking IO.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1665433002 .
2016-02-08 08:41:49 -08:00
Zachary Anderson 8f356bf87e Adds SecurityContext.useCertificateChainBytes
Changes SecurityContext.useCertificateChain to call the new method and
return a Future.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1648793005 .
2016-02-02 10:54:07 -08:00
Zachary Anderson 98771a083f Adds SecurityContext.usePrivateKeyBytes
This is the first step toward removing blocking IO calls from
the implementation of the SecurityContext API.

Using a buffer rather than a file name API will probably be needed
for implementing SecurityContext and SecureSocket with platform
specific built-in APIs on iOS/Mac/Windows rather than BoringSSL.

related #8227

R=whesse@google.com

Review URL: https://codereview.chromium.org/1616073004 .
2016-01-29 08:52:18 -08:00
William Hesse 13bf8ff9f8 Breaking Change: merge BoringSSL branch into master
This replaces the NSS secure networking library from Mozilla
with the BoringSSL library from Google. This library, based
on OpenSSL, reads certificates from files in PEM format, rather
than storing certificates and keys in a SQLite database, the
way NSS does. There will be a blog post, changelog entries,
and other documentation of the breaking changes.

Review URL: https://codereview.chromium.org//1319703002 .
2015-08-26 14:42:12 +02:00
Søren Gjesse 2ca0bc6d5a Echo the WebSocket close reason as well as the close code
When receiving a close frame with a code and reason both the code
and the reason are now added to the close frame send as response.
Before only the code was added

BUG=https://github.com/dart-lang/sdk/issues/23964
R=kustermann@google.com

Review URL: https://codereview.chromium.org//1273663002 .
2015-08-05 11:53:32 +02:00
Natalie Weizenbaum bdd5803006 Fix a WebSocket crash.
Previously, a WebSocket would crash if it was closed after its
StreamSubscription was canceled. Now, it tracks whether the subscription
was canceled by canceling and nulling out its own internal subscription.

Fixes #23845

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//1234163002 .
2015-07-15 13:30:06 -07:00
sgjesse@google.com 197f336534 Make sure to process WebSocket frames when closing a WebSocket
On a WebSocket the actual listening on the stream is causing the
processing of inbound frames to start. If the connection is closed
without ever being listened on, then a close frame from the other end
will not be processed.  In this case the timeout of waiting for a
close from the other end will always be hit.

If you are _only_ using the WebSocket connection in one direction it
seems a bit artificial to have to listen on the stream to even process
the close frame.

This change will make sure the stream is listened to when closing a
WebSocket.

This is a breaking change. Before you could close and then
listen. With this change that sequence will throw on the listen. This
is reflected in the changes that was needed for the tests.

R=kustermann@google.com, lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45679 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 09:32:39 +00:00
sgjesse@google.com 3e993231d1 Add support for user info on ws: and wss: URLs
BUG=http://dartbug.com/22152
R=kustermann@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43586 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 09:17:55 +00:00
sgjesse@google.com aae3e42f82 Allow additional headers for WebSocket connect
The WebSocket.connect now takes an Map of headers to add to the
initial handshake request.

BUG=http://dartbug.com/15855
R=kustermann@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42870 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 13:43:43 +00:00
kustermann@google.com 1ce303fa80 Bugfix in dart:io's WebSocketTransformer implementation, correctly test async behaviour of websocket, some test cleanup
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39641 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 10:44:46 +00:00
nweiz@google.com e42cfea37f Further code review changes for WebSocket.fromUpgradedSocket.
BUG=18172
R=ajohnsen@google.com, kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35764 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 20:28:02 +00:00
nweiz@google.com 7e1f169154 Make WebSocket.fromUpgradedSocket public.
This allows dart:io's WebSocket protocol code to be used in contexts
where dart:io HttpRequest and HttpResponse objects aren't available.

BUG=18172
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35540 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 20:14:20 +00:00
sgjesse@google.com c38de04d0c Change dart:io Platform.script to return a Uri.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29651 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 07:29:01 +00:00
whesse@google.com 4f08151090 Revert "Change dart:io Platform.script to return a Uri."
This reverts r29619 and r29624.  The changes look fine on the buildbot,
but need review before adding to the repository.

BUG=

TBR=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29627 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:17:37 +00:00
whesse@google.com cb0110350a Change dart:io Platform.script to return a URI. Change all uses of Platform.script to work with the new value.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 01:08:11 +00:00
whesse@google.com 8c7a9f5919 Split secure_server_client_certificate test in two, because of session cache.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27942 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-26 12:12:05 +00:00
sgjesse@google.com 18c75d3dc2 Update dart:io tests to use asyncStart/asyncEnd
R=ajohnsen@google.com
BUG=http://dartbug.com/12977

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27054 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 13:42:56 +00:00
whesse@google.com 884436dcb9 Remove uses of Path class from tests/standalone.
BUG=
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25399 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-24 07:45:06 +00:00
sgjesse@google.com 887c8e7596 Move getters from Options to Platform
The getters for executable, script and version are now statics on
Platform. I kept them on Options for now, but updated most tests to
use Platform.

R=ajohnsen@google.com, floitsch@google.com, iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24401 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:56:23 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.

* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization

R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +00:00
ajohnsen@google.com d548955117 Enable parsing of IPv6 form addresse (see rfc2373 and rfc2732).
This also wraps the 'domain' component in toString with [...], if it
contains any ':' characters.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22228 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-01 09:27:50 +00:00
sgjesse@google.com 2fdb878ebe Change the signature for all network bind calls.
All the bind calls on RawServerSocket, ServerSocket,
RawSecureServerSocket, SecureServerSocket and HttpServer (and
bindSecure on HttpServer) now have mandatory address and port
parameters. All the rest of the parameters are named optional
(including backlog).

The address parameter can be an InternetAddress or a String for all
these calls.

R=ajohnsen@google.com, whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22227 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-01 09:14:04 +00:00
ajohnsen@google.com 55963a1a6d Add new InternetAddress class with a static lookup function (including IPv6
results).

Reapply of https://codereview.chromium.org/13880029/ with fixes.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21934 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 09:26:58 +00:00
ajohnsen@google.com 60946b53fc Revert "Add new InternetAddress class with a static lookup function (including IPv6 results)."
Revert "Attempt to fix strict align issue."
Revert "Trying another fix."

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21928 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 08:10:00 +00:00
ajohnsen@google.com 20d1f5ddda Add new InternetAddress class with a static lookup function (including IPv6 results).
Reapply of https://codereview.chromium.org/14083007/ with fixes.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21923 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 07:12:05 +00:00
sgjesse@google.com 6f14d9678a Fix static type errors in a number of tests
R=ager@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21919 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 06:12:08 +00:00
ager@google.com 431954b584 Rename dart:typeddata to dart:typed_data.
R=asiva@google.com, floitsch@google.com, srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:54:54 +00:00
sgjesse@google.com afcb3ce69e Revert "Add new InternetAddress class with a static lookup function (including IPv6 results)"
TBR=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21865 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 10:07:03 +00:00
ajohnsen@google.com b33d142414 Add new InternetAddress class with a static lookup function (including IPv6 results).
Socket.connect/ServerSocket.bind now accepts IPv6 host names. If a new ServerSocket is connected to an IPv6 interface, it will (if possible) support incoming IPv4 connections as well.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21862 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 09:36:18 +00:00
ajohnsen@google.com b5705045db Improve WebSocket interface by making it implement StreamSink.
This renames send to add, but also adds the addStream method, making it
possible to pause/resume the underlying Socket.

Remove http_shutdown_test from status file. Crash have not been seen for a while.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21553 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 15:08:21 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
asiva@google.com 69d0484d2a - Use dart:typedata types in the Dart API calls.
- Change the dart/io code to not use dart:scalarlist
Review URL: https://codereview.chromium.org//12730013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19848 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 10:57:48 +00:00
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
ajohnsen@google.com 89349ff065 Add some Websocket tests.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19462 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 11:31:26 +00:00
ajohnsen@google.com ab0ca3a02f Improve web-socket implementation by using making _WebSocketProtocolProcessor a StreamTransformer.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19454 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 09:40:53 +00:00
sgjesse@google.com b7183dc258 Add individual HTTP request to web socket upgrade support
Added the static method "upgrade" on the WebSocketTransformer class to
allow upgrading individual HTTPRequest objects to web scoket
connections.

R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19395 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 15:50:01 +00:00
sgjesse@google.com d6845c65ad Change the web socket interface
The stream of events from a web socket is now the actual messages
(text as String and binary as List<int>) instead of instances of
MessageEvent. The CloseEvent is reposted as onDone on the stream with
the close code and close reason available as properties on the web
socket object.

Next step is to make the web socket implement IOSink.

R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19376 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 10:40:03 +00:00
ajohnsen@google.com 9cf108141b Close HttpServer in WebSocket tests.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19250 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 17:43:37 +00:00
ajohnsen@google.com ba6eee87c1 Keep track of closing socket, in WebSocket, so we don't write once the socket is closed.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19248 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 17:19:57 +00:00