-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathCsCssParser.cs
More file actions
26 lines (22 loc) · 662 Bytes
/
CsCssParser.cs
File metadata and controls
26 lines (22 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace AngleSharp.Performance.Css
{
using Alba.CsCss.Style;
using System;
class CsCssParser : ITestee
{
public String Name => "CsCss";
public Type Library => typeof(CssLoader);
public void Run(String source)
{
var parser = new CssLoader { Compatibility = Alba.CsCss.BrowserCompatibility.FullStandards };
try
{
parser.ParseSheet(source, new Uri("http://localhost/foo.css"), new Uri("http://localhost"));
}
catch
{
// May crash otherwise if invalid input detected ...
}
}
}
}