mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision cb947c01 (#352221)
- Implement CefRequestHandler::OnBeforeBrowse using NavigationThrottle instead of ResourceThrottle (see http://crbug.com/537634). The CefRequest object passed to OnBeforeBrowse will no longer have an associated request identifier. - Mac: Remove additional helper apps which are no longer required (see http://crbug.com/520680) - Remove the UR_FLAG_REPORT_RAW_HEADERS flag which is no longer supported (see http://crbug.com/517114) - Remove the CefBrowserSettings.java parameter. Java is an NPAPI plugin and NPAPI plugins are no longer supported (see http://crbug.com/470301#c11) - Add CefFormatUrlForSecurityDisplay function in cef_parser.h - Fix crash when passing `--disable-extensions` command-line flag (issue #1721) - Linux: Fix NSS handler loading (issue #1727)
This commit is contained in:
@ -219,6 +219,34 @@ TEST(ParserTest, ParseURLNonStandard) {
|
||||
EXPECT_STREQ("foo", query.ToString().c_str());
|
||||
}
|
||||
|
||||
TEST(ParserTest, FormatUrlForSecurityDisplay) {
|
||||
CefString result;
|
||||
const char* kLang = "en-US";
|
||||
|
||||
// Omits the protocol if it's standard.
|
||||
result = CefFormatUrlForSecurityDisplay("http://tests.com/foo.html", kLang);
|
||||
EXPECT_STREQ("http://tests.com", result.ToString().c_str());
|
||||
|
||||
// Omits the port if it's the expected value for the protocol.
|
||||
result = CefFormatUrlForSecurityDisplay("http://tests.com:80/foo.html",
|
||||
kLang);
|
||||
EXPECT_STREQ("http://tests.com", result.ToString().c_str());
|
||||
|
||||
// Don't omit non-standard ports.
|
||||
result = CefFormatUrlForSecurityDisplay("http://tests.com:8088/foo.html",
|
||||
kLang);
|
||||
EXPECT_STREQ("http://tests.com:8088", result.ToString().c_str());
|
||||
|
||||
// Don't omit the protocol for file URLs.
|
||||
result = CefFormatUrlForSecurityDisplay("file:///c/tests/foo.html", kLang);
|
||||
EXPECT_STREQ("file:///c/tests/foo.html", result.ToString().c_str());
|
||||
|
||||
// Empty |languages| should be OK.
|
||||
result = CefFormatUrlForSecurityDisplay("http://tests.com/foo.html",
|
||||
CefString());
|
||||
EXPECT_STREQ("http://tests.com", result.ToString().c_str());
|
||||
}
|
||||
|
||||
TEST(ParserTest, GetMimeType) {
|
||||
CefString mime_type;
|
||||
|
||||
|
Reference in New Issue
Block a user