public void TestFromStringList() { using (var url = QUrl.FromUserInput("qt-project.org")) { } // TODO }
public void TestMatches() { using (var n = new QUrl("ftp://*****:*****@ftp.example.com:2021?58#question13")) { } throw new AssertionException("Not implemented!"); }
public void TestResolved() { var baseUrl = new QUrl("http://qt.digia.com/Support/"); var relativeUrl = new QUrl("../Product/Library/"); var res = baseUrl.Resolved(relativeUrl); Assert.AreEqual("http://qt.digia.com/Product/Library/", res.ToString()); }
public void TestCopyConstructor() { using (var s = new QUrl(Url2)) { using (new QUrl(s)) { } } }
public void TestSetFragment() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); Assert.AreEqual("#question13", baseUrl.Fragment()); }
void on_textBrowser_anchorClicked(QUrl link) { if (link.ToString() == "#message-eric") { var account = Gui.ShowAccountSelectMenu(null); if (account != null) { Gui.TabbedChatsWindow.StartChat(account, new jabber.JID("*****@*****.**")); } } }
public void TestSetPath() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetPassword("5uQQo_f2"); baseUrl.SetPath("/pub/something/"); Assert.AreEqual("/pub/something/", baseUrl.Path()); }
public void TestTopLevelDomain() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetUserName("tray2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetUrl(""); Assert.AreEqual(".com", baseUrl.TopLevelDomain()); }
public void TestUrl() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetUserName("tray2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetUrl(""); throw new AssertionException("Url() not implemented!"); //Assert.AreEqual(".com", baseUrl.Url()); }
void HandleActivityLinkClicked(QUrl url) { try { Uri uri = new Uri(url.ToString()); if (uri.Scheme == "http" || uri.Scheme == "https") { Util.Open(uri.ToString()); } else { if (uri.Scheme == "xmpp") { JID jid = new JID(uri.AbsolutePath); var query = XmppUriQueryInfo.ParseQuery(uri.Query); switch (query.QueryType) { case "message": // FIXME: Should not ask which account to use, should use whichever account generated the event. var account = Gui.ShowAccountSelectMenu(this); if (account != null) { Gui.TabbedChatsWindow.StartChat(account, jid); } break; default: throw new NotSupportedException("Unsupported query type: " + query.QueryType); } } else if (uri.Scheme == "activity-item") { string itemId = uri.AbsolutePath; string action = uri.Query.Substring(1); m_ActivityFeedItems[itemId].TriggerAction(action); } } } catch (Exception ex) { Console.Error.WriteLine(ex); QMessageBox.Critical(null, "Synapse Error", ex.Message); } }
void HandleLinkClicked(QUrl url) { // We don't open arbitrary links for security reasons. var validSchemes = new [] { "http", "https", "ftp", "xmpp" }; if (validSchemes.Contains(url.Scheme().ToLower())) { Util.Open(url); } else if (url.Scheme().ToLower() == "xmpp") { // FIXME: Add xmpp: uri handler. QMessageBox.Information(this.TopLevelWidget(), "Not implenented", "xmpp: uris not yet supported."); // Ignore # urls. } else if (!url.HasFragment()) { QMessageBox.Information(this.TopLevelWidget(), "Link Fragment", url.HasFragment() + " " + url.Fragment()); QMessageBox.Information(this.TopLevelWidget(), "Link URL", url.ToString()); } }
public void TestNotEqualOperator() { var n = new QUrl(Url); Assert.IsFalse(n != _qUrl); }
/// <remarks> /// Creates a MediaSource object for a URL. /// \param url URL to a media file or stream. /// </remarks> <short> Creates a MediaSource object for a URL.</short> public MediaSource(QUrl url) : this((Type)null) { CreateProxy(); interceptor.Invoke("MediaSource#", "MediaSource(const QUrl&)", typeof(void), typeof(QUrl), url); }
public void TestMatches() { var n = new QUrl("ftp://*****:*****@ftp.example.com:2021?58#question13"); throw new AssertionException("Not implemented!"); }
public void TestFromLocalFile() { var u = QUrl.FromLocalFile("//servername/path/to/file.txt"); Assert.AreEqual("file.txt", u.FileName()); }
public void Init() { this.qUrl = new QUrl(Url); }
public void TestStringTolerantConstructor() { var s = new QUrl("http://www.example.com/List of holidays.xml"); }
public void TestEmpyConstructor() { var s = new QUrl(); }
public void TestSetPassword() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetPassword("5uQQo_f2"); Assert.AreEqual("5uQQo_f2", baseUrl.Password()); }
public void Init() { // TODO: Add Init code. _qUrl = new QUrl(Url); }
public void TestStringDecodedConstructor() { var s = new QUrl("http://www.example.com/List of holidays.xml", QUrl.ParsingMode.DecodedMode); }
public void TestIsLocalFile() { var u = QUrl.FromLocalFile("//servername/path/to/file.txt"); Assert.IsTrue(u.IsLocalFile); }
public void TestSetUserInfo() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetUserInfo("tray2:5uQQo_f2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetUrl(""); Assert.AreEqual("tray2", baseUrl.UserName()); Assert.AreEqual("5uQQo_f2", baseUrl.Password()); Assert.AreEqual("tray2:5uQQo_f2", baseUrl.UserInfo()); }
public void TestCopyConstructor() { var s = new QUrl("http://www.example.com/List of holidays.xml"); var n = new QUrl(s); }
public void TestSetQuery2() { var baseUrl = new QUrl(); baseUrl.Scheme = "ftp"; baseUrl.SetAuthority("tray:[email protected]:2021"); baseUrl.SetFragment("#question13"); baseUrl.SetHost("ftp.example.com"); baseUrl.SetPassword("5uQQo_f2"); baseUrl.SetPath("/pub/something/"); baseUrl.SetPort(2022); baseUrl.SetQuery(new QUrlQuery("new")); Assert.AreEqual("new", baseUrl.Query()); }
public void TestNotEqualOperator() { var n = new QUrl(Url); Assert.IsFalse(n != this.qUrl); }
public void TestStringStrictConstructor() { var s = new QUrl("http://www.example.com/List of holidays.xml", QUrl.ParsingMode.StrictMode); }
public void TestEqualWithQUrlOperator() { QUrl n = this.qUrl; //Assert.IsFalse(n != _qUrl); }
public void TestEqualOperator() { var n = new QUrl(Url); Assert.AreEqual(n, this.qUrl); }
public void TestEqualOperator() { var n = new QUrl(Url); Assert.AreEqual(n, _qUrl); }
void on_webView_linkClicked(QUrl url) { RequestUrl(new Uri(url.ToString())); }