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

Unified Diff: chrome/common/chrome_content_client_unittest.cc

Issue 1272113002: Allow url::SchemeHostPort to hold non-file scheme without port (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing copy assignment 2 Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/chrome_content_client_unittest.cc
diff --git a/chrome/common/chrome_content_client_unittest.cc b/chrome/common/chrome_content_client_unittest.cc
index 42514d7d9cd3eb31e77616737f38882591d0ea11..fa0f82e6cd8ddb1bf8f503bc8e2fbdb10734e86c 100644
--- a/chrome/common/chrome_content_client_unittest.cc
+++ b/chrome/common/chrome_content_client_unittest.cc
@@ -4,10 +4,16 @@
#include "chrome/common/chrome_content_client.h"
+#include <string.h>
+
#include "base/command_line.h"
#include "base/strings/string_split.h"
#include "content/public/common/content_switches.h"
+#include "extensions/common/constants.cc"
#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
+#include "url/origin.h"
+#include "url/url_util.h"
namespace {
@@ -81,4 +87,16 @@ TEST(ChromeContentClientTest, Basic) {
#endif
}
+TEST(ChromeContentClientTest, AdditionalSchemes) {
+ EXPECT_TRUE(url::IsStandard(
+ extensions::kExtensionScheme,
+ url::Component(0, strlen(extensions::kExtensionScheme))));
+
+ GURL extension_url(
+ "chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef/foo.html");
+ url::Origin origin(extension_url);
+ EXPECT_EQ("chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef",
+ origin.Serialize());
+}
+
} // namespace chrome_common

Powered by Google App Engine
This is Rietveld 408576698