summaryrefslogtreecommitdiffstats
path: root/url/url_canon_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix url_unittests URLCanonTest.DoAppendUTF8Invalid failures with ↵phajdan.jr@chromium.org2014-06-171-3/+8
| | | | | | | | | | | | | dcheck_always_on Just make the test disabled as if in Debug mode. BUG=383311 R=brettw@chromium.org Review URL: https://codereview.chromium.org/331693005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277600 0039d316-1c4b-4281-b951-d872f2087c98
* Make it possible to build url/ without ICU on android.mmenke@chromium.org2014-05-071-106/+13
| | | | | | | | | | | This is needed to reduce binary size of net/ when build as a library. BUG=362608 Review URL: https://codereview.chromium.org/257673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268740 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed namespaces in src/url.vitalybuka@chromium.org2014-04-221-541/+525
| | | | | | | | | | | | | url_util -> url url_parse -> url url_canon -> url BUG=364747 R=brettw@chromium.org, thestig@chromium.org, willchan@chromium.org Review URL: https://codereview.chromium.org/242463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265120 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent URLs with invalid schemes from resolving as relative to data: URLs.tsepez@chromium.org2014-03-031-0/+1
| | | | | | | | | | | | There is a missing bit of logic when the scheme is invalid that is present in the case where the scheme is empty. Either way, we can't consider this a relative URL if the base scheme isn't heirarchical. BUG=346132 Review URL: https://codereview.chromium.org/177093008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254565 0039d316-1c4b-4281-b951-d872f2087c98
* Support URL fragment resolution against non-hierarchical schemesjoth@chromium.org2013-11-231-10/+13
| | | | | | | | | | | | | | | | | | | | | | Support URL fragment resolution against non-hierarchical schemes As a result, data: about: etc now have 'query' and 'ref' components parsed; as a result a new GURL::GetContent() convenience is added to retrieve the spec with the scheme stripped off. A complication in supporting this is that we now need to allow whitespace to trailing whitespace to be preserved when transferring url_parse::Parsed structs between KURL and GURL. Without this, the URL prior to the #fragment can change (i.e. whitespace stripped) when following an anchor link which breaks the page (causes reload from source). See http://crbug.com/291747 for more details on this. R=brettw@chromium.org TBR=cbentzel@chromium.org BUG=291747 Review URL: https://codereview.chromium.org/23835019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236917 0039d316-1c4b-4281-b951-d872f2087c98
* Support IDNA 2008 with UTS46.jshin@chromium.org2013-09-291-13/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UTS 46 provides a migration path from IDNA 2003 to IDNA 2008. 1. Use the up-to-date Unicode data; new characters were added and some case-folding/mapping have changed since Unicode 3.2 on which IDNA 2003 is based. 2. Define a case folding/mapping as is the case with IDNA 2003. 3. Use transitional mechanism for 4 deviant characters : German sharp-S, Greek final-sigma, ZWJ and ZWNJ. That is, the former two are mapped to 'ss' and regular sigma and the latter two are dropped. All the major browsers do this at the moment so allowing them does not do any good. We'll review this later as the consensus builds among browser vendors and registrars. We can also consider handling them separately. For instance, ZWJ/ZWNJ can be allowed with ContextJ rules, which requires a minor change in ICU's UTS 46 implementation. 4. Symbol and punctuations continue to be allowed. We also do the following: 1. Continue to "violate" STD3 rules about non-LDH (Letter, digits and hyphens) by allowing non-LDH's. That is no change from the current implementation. 2. Do not allow unassigned code points any more. With an up-to-date Unicode data, this does not make much difference. And the chance of new characters not yet reflected in our Unicode data popping up in a domain name is extremely low. 3. Continue to use CHECK_BIDI. The Bidi rule in IDNA 2008 is more permissive than in IDNA 2003. References: 1. http://unicode.org/reports/tr46/ and references therein to IDNA 2003 and 2008 RFCs. 2. What IE 10 does : http://goo.gl/3XBhqw 3. Mozilla bug : https://bugzilla.mozilla.org/show_bug.cgi?id=479520 BUG=61328 TEST=url_unittests (URLCanonTest.Host), net_unittests (NetUtilTest.IDNToU*), unittests (X509CertificateModelTest.*) R=brettw@chromium.org, pkasting@chromium.org, rsleevi@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/23642003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225878 0039d316-1c4b-4281-b951-d872f2087c98
* Make relative file url parsing fail where there is a host:port in the ↵tsepez@chromium.org2013-09-181-0/+5
| | | | | | | | | | | | | relative URL. BUG=285720 R=brettw@chromium.org, jar@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223928 Review URL: https://codereview.chromium.org/23464046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223969 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 223928 "Make relative file url parsing fail where there i..."tsepez@chromium.org2013-09-181-5/+0
| | | | | | | | | | | | | | | > Make relative file url parsing fail where there is a host:port in the relative URL. > > BUG=285720 > R=brettw@chromium.org, jar@chromium.org > > Review URL: https://codereview.chromium.org/23464046 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/23702051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223940 0039d316-1c4b-4281-b951-d872f2087c98
* Make relative file url parsing fail where there is a host:port in the ↵tsepez@chromium.org2013-09-181-0/+5
| | | | | | | | | | | relative URL. BUG=285720 R=brettw@chromium.org, jar@chromium.org Review URL: https://codereview.chromium.org/23464046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223928 0039d316-1c4b-4281-b951-d872f2087c98
* Make inttypes.h and similar macro usage C++11-friendly.thakis@chromium.org2013-07-251-1/+1
| | | | | | | | | | | | | | | | "foo"PRIuS is a user-defined literal in C++11. Add spaces around these macros. Likewise, L"\xab"L"c" is a user-defined literal, so insert a space in the middle. No functionality change. BUG=chromium:263960 TBR=alokp@chromium.org, dmichael@chromium.org, enne@chromium.org, isherman@chromium.org, rsleevi@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/20182002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213566 0039d316-1c4b-4281-b951-d872f2087c98
* Replace third_party/icu/public with third_party/icu/source in the include ↵jshin@chromium.org2013-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | directives. This is to move back icu headers in third_party/icu/public/{i18n,common}/unicode back to their upstream locations in third_party/icu/source/{i18n,common}/unicode. http://codereview.chromium.org/18836004 has is a CL to move ICU header files. Roll ICU to the version with the above ICU CL (http://crrev.com/211851 ). In addition to the global replacement of third_party/icu/public with third_party/icu/source, the top-level DEPS, DEPS in printing and chrome/ are tightened up. (the latter two were too permissive (it used to allow any header from third_party/icu). Besides, sync '-foo' list in ios/public/DEPS with '+foo' in the top-level DEPS and build/linux/unbundled/icu.gyp is updated. BUG=251433 TEST=Compile succeeds on all bots. checkdeps.py does not find any error. TBR=brettw,sky,wtc Review URL: https://chromiumcodereview.appspot.com/18252003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212324 0039d316-1c4b-4281-b951-d872f2087c98
* Use base:: on string16 and char16 in net/ and url/avi@chromium.org2013-06-111-23/+23
| | | | | | | | | | BUG=none TEST=no change TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/16413006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205636 0039d316-1c4b-4281-b951-d872f2087c98
* url: Replace Google copyright with the Chromium licence in all files that ↵tfarina@chromium.org2013-04-241-28/+3
| | | | | | | | | | | uses it. BUG=229660 R=brettw@chromium.org Review URL: https://codereview.chromium.org/14222028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195974 0039d316-1c4b-4281-b951-d872f2087c98
* url: Fix the include paths to icu unicode APIs.tfarina@chromium.org2013-04-201-1/+1
| | | | | | | | | | | BUG=229660 TEST=url_unittests R=brettw@chromium.org TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/14371002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195396 0039d316-1c4b-4281-b951-d872f2087c98
* url: Build it as a static library.tfarina@chromium.org2013-04-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | This is temporary just to avoid weird link issues in Windows XP. - Update the gyp file. - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory name. - Update the header include paths. - Update the header include guards. - Rename the target name from googleurl to url and googleurl_unittests to url_unittests. - Remove GURL_API (this will be replaced by URL_EXPORT when we componentize it again). - Remove url_common.h (will be replaced by url_export.h when we componentize it again). BUG=229660 TEST=url_unittests R=brettw@chromium.org Review URL: https://codereview.chromium.org/13998025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195005 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 193777 "url: Changes to make it build standalone."jochen@chromium.org2013-04-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | url/url_canon_stdstring.h:65: error: undefined reference to 'vtable for url_canon::StdStringCanonOutput' > url: Changes to make it build standalone. > > - Update the gyp file. > - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory > name. > - Update the header include paths. > - Update the header include guards. > - Rename the target name from googleurl to url and googleurl_unittests to > url_unittests. > - Add missing OVERRIDEs where clang complains. > > BUG=229660 > TEST=url_unittests > R=brettw@chromium.org > > Review URL: https://codereview.chromium.org/14016005 TBR=tfarina@chromium.org Review URL: https://codereview.chromium.org/14264002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194155 0039d316-1c4b-4281-b951-d872f2087c98
* url: Changes to make it build standalone.tfarina@chromium.org2013-04-111-6/+6
| | | | | | | | | | | | | | | | | | | - Update the gyp file. - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory name. - Update the header include paths. - Update the header include guards. - Rename the target name from googleurl to url and googleurl_unittests to url_unittests. - Add missing OVERRIDEs where clang complains. BUG=229660 TEST=url_unittests R=brettw@chromium.org Review URL: https://codereview.chromium.org/14016005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193777 0039d316-1c4b-4281-b951-d872f2087c98
* Move googleurl into the Chrome repo.brettw@chromium.org2013-04-101-0/+2133
Original location: https://code.google.com/p/google-url/ This includes changes up to r184. These files are unchanged from the Google Code repo and do not yet build. Updating includes, etc. will be done in a separate pass. Review URL: https://codereview.chromium.org/13821004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193439 0039d316-1c4b-4281-b951-d872f2087c98