Commit Graph

12 Commits

Author SHA1 Message Date
Bob Nystrom edee53f93d Bring back the deleted 1.0 corelib tests.
What is dead may never die.

Change-Id: I80ef766b8ce2b6e1416df8e1f9b91fb74169dc79
Reviewed-on: https://dart-review.googlesource.com/7483
Reviewed-by: William Hesse <whesse@google.com>
2017-09-21 18:29:40 +00:00
Ben Konyi 4d64b9ee37 Migrate test block 30 + corelib portion of block 31 to Dart 2.0.
Minor changes to uri_path_test and uri_query_test, and status file
updates.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2983123002 .
2017-07-20 08:07:37 -07: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
lrn@google.com 9e765a713c Also fix uri_query_test.
Review URL: https://codereview.chromium.org//354003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37733 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 11:49:11 +00:00
lrn@google.com b9d3d5bbae Try to retain original structure of URI.
This changes URI.parse to retain empty autorities, queries and fragments.
That is: `Uri.parse("foo:///x?#")` will give a Uri with toString "foo:///x?#",
as opposed to the previous "foo:/".

It also makes a difference between passing "" and null to the Uri constructor.

We still omit empty user-info and default port values from the toString.

R=ajohnsen@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37728 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 09:41:30 +00:00
lrn@google.com f2afbd9a62 Revert "Try to retain original structure of URI."
Breaks dart2js.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37692 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 11:59:13 +00:00
lrn@google.com 0200cfcc67 Try to retain original structure of URI.
This changes URI.parse to retain empty autorities, queries and fragments.
That is: `Uri.parse("foo:///x?#")` will give a Uri with toString "foo:///x?#",
as opposed to the previous "foo:/".

It also makes a difference between passing "" and null to the Uri constructor.

We still omit empty user-info and default port values from the toString.

R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37690 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 11:16:32 +00:00
sgjesse@google.com b7260126ca Make some HTTP utility functions public
Added a new static function splitQueryString to the URI class to expose parsing of a query string without constructing a URI.

Added class HttpDate in dart:io with a few HTTP date parsing and formatting methods.

Also turned some Uri comments into dartdoc.

I have not remove the parseQueryString and decodeUrlEncodedString from _HttpUtils as they still do some non standard things that I am not sure we want to add to the URI class. These are:

* Supporting semi-colon as separator in query strings (see http://www.w3.org/TR/REC-html40/appendix/notes.html#ampersands-in-uris)
* Supporting other encodings than UTF-8 for percent encoded strings

R=ajohnsen@google.com
BUG=http://dartbug.com/9888

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23972 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 12:19:09 +00:00
sgjesse@google.com cce76fac97 Fix deprecation warning
TBR=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23535 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 10:29:01 +00:00
sgjesse@google.com 590a7f61b5 Fix some bugs in the Uri class
The queryParameters key was not decoded if there was no = sign after it.

The normalization skipped any normal characters after the last encoded
character.

R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23533 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 09:37:06 +00:00
sgjesse@google.com 251a6f0ed2 Avoid parsing path and query string more than once
This has the side-effect of making a Uri mutable to some extend. By
not actuallt storing the passed in pathSegments and queryParameters
objects I think this is managable.

I think repeated access to uri.queryParameters should not parse the
query string into a map more than once.

R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23530 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 09:17:08 +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