Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: url/gurl_unittest.cc

Issue 2098723003: Add content ID scheme to //url/url_constants.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | url/url_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 #include "url/url_canon.h" 10 #include "url/url_canon.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 TEST(GURLTest, IsStandard) { 654 TEST(GURLTest, IsStandard) {
655 GURL a("http:foo/bar"); 655 GURL a("http:foo/bar");
656 EXPECT_TRUE(a.IsStandard()); 656 EXPECT_TRUE(a.IsStandard());
657 657
658 GURL b("foo:bar/baz"); 658 GURL b("foo:bar/baz");
659 EXPECT_FALSE(b.IsStandard()); 659 EXPECT_FALSE(b.IsStandard());
660 660
661 GURL c("foo://bar/baz"); 661 GURL c("foo://bar/baz");
662 EXPECT_FALSE(c.IsStandard()); 662 EXPECT_FALSE(c.IsStandard());
663
664 GURL d("cid:bar@baz");
665 EXPECT_FALSE(d.IsStandard());
663 } 666 }
664 667
665 TEST(GURLTest, SchemeIsHTTPOrHTTPS) { 668 TEST(GURLTest, SchemeIsHTTPOrHTTPS) {
666 EXPECT_TRUE(GURL("http://bar/").SchemeIsHTTPOrHTTPS()); 669 EXPECT_TRUE(GURL("http://bar/").SchemeIsHTTPOrHTTPS());
667 EXPECT_TRUE(GURL("HTTPS://BAR").SchemeIsHTTPOrHTTPS()); 670 EXPECT_TRUE(GURL("HTTPS://BAR").SchemeIsHTTPOrHTTPS());
668 EXPECT_FALSE(GURL("ftp://bar/").SchemeIsHTTPOrHTTPS()); 671 EXPECT_FALSE(GURL("ftp://bar/").SchemeIsHTTPOrHTTPS());
669 } 672 }
670 673
671 TEST(GURLTest, SchemeIsWSOrWSS) { 674 TEST(GURLTest, SchemeIsWSOrWSS) {
672 EXPECT_TRUE(GURL("WS://BAR/").SchemeIsWSOrWSS()); 675 EXPECT_TRUE(GURL("WS://BAR/").SchemeIsWSOrWSS());
(...skipping 26 matching lines...) Expand all
699 }; 702 };
700 703
701 for (const auto& test : cases) { 704 for (const auto& test : cases) {
702 GURL url(test.url); 705 GURL url(test.url);
703 EXPECT_EQ(test.expected, url.path()) << test.url; 706 EXPECT_EQ(test.expected, url.path()) << test.url;
704 EXPECT_EQ(test.expected, url.GetContent()) << test.url; 707 EXPECT_EQ(test.expected, url.GetContent()) << test.url;
705 } 708 }
706 } 709 }
707 710
708 } // namespace url 711 } // namespace url
OLDNEW
« no previous file with comments | « no previous file | url/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698