Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
ecda6766
Commit
ecda6766
authored
Mar 26, 2017
by
Tebjan Halm
Committed by
GitHub
Mar 26, 2017
Browse files
Merge pull request #306 from mrbean-bremen/test-runner
Added test description in test runner
parents
1a7f200b
35e16615
Changes
3
Show whitespace changes
Inline
Side-by-side
Source/NonSvgElement.cs
View file @
ecda6766
...
@@ -22,5 +22,16 @@ namespace Svg
...
@@ -22,5 +22,16 @@ namespace Svg
return
newObj
;
return
newObj
;
}
}
/// <summary>
/// Publish the element name to be able to differentiate non-svg elements.
/// </summary>
public
string
Name
{
get
{
return
ElementName
;
}
}
}
}
}
}
\ No newline at end of file
Tests/SvgW3CTestRunner/View.Designer.cs
View file @
ecda6766
...
@@ -31,7 +31,6 @@ namespace SvgW3CTestRunner
...
@@ -31,7 +31,6 @@ namespace SvgW3CTestRunner
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
lstFiles
=
new
System
.
Windows
.
Forms
.
ListBox
();
this
.
lstFiles
=
new
System
.
Windows
.
Forms
.
ListBox
();
this
.
boxConsoleLog
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
splitContainer1
=
new
System
.
Windows
.
Forms
.
SplitContainer
();
this
.
splitContainer1
=
new
System
.
Windows
.
Forms
.
SplitContainer
();
this
.
tableLayoutPanel2
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tableLayoutPanel2
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
...
@@ -44,6 +43,11 @@ namespace SvgW3CTestRunner
...
@@ -44,6 +43,11 @@ namespace SvgW3CTestRunner
this
.
picPng
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
picPng
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
bottomTabBox
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
outputTab
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
boxConsoleLog
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
descriptionTab
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
boxDescription
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
fIleToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
fIleToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
runAllToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
runAllToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
@@ -57,6 +61,9 @@ namespace SvgW3CTestRunner
...
@@ -57,6 +61,9 @@ namespace SvgW3CTestRunner
this
.
tableLayoutPanel3
.
SuspendLayout
();
this
.
tableLayoutPanel3
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picSVGPNG
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picSVGPNG
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picPng
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picPng
)).
BeginInit
();
this
.
bottomTabBox
.
SuspendLayout
();
this
.
outputTab
.
SuspendLayout
();
this
.
descriptionTab
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
...
@@ -66,22 +73,10 @@ namespace SvgW3CTestRunner
...
@@ -66,22 +73,10 @@ namespace SvgW3CTestRunner
this
.
lstFiles
.
FormattingEnabled
=
true
;
this
.
lstFiles
.
FormattingEnabled
=
true
;
this
.
lstFiles
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
lstFiles
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
lstFiles
.
Name
=
"lstFiles"
;
this
.
lstFiles
.
Name
=
"lstFiles"
;
this
.
lstFiles
.
Size
=
new
System
.
Drawing
.
Size
(
174
,
7
77
);
this
.
lstFiles
.
Size
=
new
System
.
Drawing
.
Size
(
174
,
7
65
);
this
.
lstFiles
.
TabIndex
=
0
;
this
.
lstFiles
.
TabIndex
=
0
;
this
.
lstFiles
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
lstFiles_SelectedIndexChanged
);
this
.
lstFiles
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
lstFiles_SelectedIndexChanged
);
//
//
// boxConsoleLog
//
this
.
boxConsoleLog
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
boxConsoleLog
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
boxConsoleLog
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
786
);
this
.
boxConsoleLog
.
Name
=
"boxConsoleLog"
;
this
.
boxConsoleLog
.
ReadOnly
=
true
;
this
.
boxConsoleLog
.
Size
=
new
System
.
Drawing
.
Size
(
1093
,
64
);
this
.
boxConsoleLog
.
TabIndex
=
0
;
this
.
boxConsoleLog
.
Text
=
""
;
this
.
boxConsoleLog
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
boxConsoleLog_MouseDown
);
//
// tableLayoutPanel1
// tableLayoutPanel1
//
//
this
.
tableLayoutPanel1
.
ColumnCount
=
2
;
this
.
tableLayoutPanel1
.
ColumnCount
=
2
;
...
@@ -89,14 +84,14 @@ namespace SvgW3CTestRunner
...
@@ -89,14 +84,14 @@ namespace SvgW3CTestRunner
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
splitContainer1
,
1
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
splitContainer1
,
1
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
lstFiles
,
0
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
lstFiles
,
0
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
bo
xConsoleLog
,
1
,
1
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
bo
ttomTabBox
,
1
,
1
);
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
24
);
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
24
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
2
;
this
.
tableLayoutPanel1
.
RowCount
=
2
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
70F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
70F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
1279
,
8
53
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
1279
,
8
41
);
this
.
tableLayoutPanel1
.
TabIndex
=
1
;
this
.
tableLayoutPanel1
.
TabIndex
=
1
;
//
//
// splitContainer1
// splitContainer1
...
@@ -112,7 +107,7 @@ namespace SvgW3CTestRunner
...
@@ -112,7 +107,7 @@ namespace SvgW3CTestRunner
// splitContainer1.Panel2
// splitContainer1.Panel2
//
//
this
.
splitContainer1
.
Panel2
.
Controls
.
Add
(
this
.
tableLayoutPanel3
);
this
.
splitContainer1
.
Panel2
.
Controls
.
Add
(
this
.
tableLayoutPanel3
);
this
.
splitContainer1
.
Size
=
new
System
.
Drawing
.
Size
(
1093
,
7
77
);
this
.
splitContainer1
.
Size
=
new
System
.
Drawing
.
Size
(
1093
,
7
65
);
this
.
splitContainer1
.
SplitterDistance
=
563
;
this
.
splitContainer1
.
SplitterDistance
=
563
;
this
.
splitContainer1
.
TabIndex
=
0
;
this
.
splitContainer1
.
TabIndex
=
0
;
//
//
...
@@ -132,17 +127,17 @@ namespace SvgW3CTestRunner
...
@@ -132,17 +127,17 @@ namespace SvgW3CTestRunner
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
563
,
7
77
);
this
.
tableLayoutPanel2
.
Size
=
new
System
.
Drawing
.
Size
(
563
,
7
65
);
this
.
tableLayoutPanel2
.
TabIndex
=
0
;
this
.
tableLayoutPanel2
.
TabIndex
=
0
;
//
//
// picSaveLoad
// picSaveLoad
//
//
this
.
picSaveLoad
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
picSaveLoad
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
picSaveLoad
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
picSaveLoad
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
picSaveLoad
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
401
);
this
.
picSaveLoad
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
395
);
this
.
picSaveLoad
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picSaveLoad
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picSaveLoad
.
Name
=
"picSaveLoad"
;
this
.
picSaveLoad
.
Name
=
"picSaveLoad"
;
this
.
picSaveLoad
.
Size
=
new
System
.
Drawing
.
Size
(
563
,
37
6
);
this
.
picSaveLoad
.
Size
=
new
System
.
Drawing
.
Size
(
563
,
37
0
);
this
.
picSaveLoad
.
TabIndex
=
2
;
this
.
picSaveLoad
.
TabIndex
=
2
;
this
.
picSaveLoad
.
TabStop
=
false
;
this
.
picSaveLoad
.
TabStop
=
false
;
//
//
...
@@ -162,14 +157,14 @@ namespace SvgW3CTestRunner
...
@@ -162,14 +157,14 @@ namespace SvgW3CTestRunner
this
.
picSvg
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
13
);
this
.
picSvg
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
13
);
this
.
picSvg
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picSvg
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picSvg
.
Name
=
"picSvg"
;
this
.
picSvg
.
Name
=
"picSvg"
;
this
.
picSvg
.
Size
=
new
System
.
Drawing
.
Size
(
563
,
3
75
);
this
.
picSvg
.
Size
=
new
System
.
Drawing
.
Size
(
563
,
3
69
);
this
.
picSvg
.
TabIndex
=
1
;
this
.
picSvg
.
TabIndex
=
1
;
this
.
picSvg
.
TabStop
=
false
;
this
.
picSvg
.
TabStop
=
false
;
//
//
// label3
// label3
//
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
38
8
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
38
2
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
13
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
13
);
this
.
label3
.
TabIndex
=
3
;
this
.
label3
.
TabIndex
=
3
;
...
@@ -191,17 +186,17 @@ namespace SvgW3CTestRunner
...
@@ -191,17 +186,17 @@ namespace SvgW3CTestRunner
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
7
77
);
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
7
65
);
this
.
tableLayoutPanel3
.
TabIndex
=
0
;
this
.
tableLayoutPanel3
.
TabIndex
=
0
;
//
//
// picSVGPNG
// picSVGPNG
//
//
this
.
picSVGPNG
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
picSVGPNG
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
picSVGPNG
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
picSVGPNG
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
picSVGPNG
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
401
);
this
.
picSVGPNG
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
395
);
this
.
picSVGPNG
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picSVGPNG
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picSVGPNG
.
Name
=
"picSVGPNG"
;
this
.
picSVGPNG
.
Name
=
"picSVGPNG"
;
this
.
picSVGPNG
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
37
6
);
this
.
picSVGPNG
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
37
0
);
this
.
picSVGPNG
.
TabIndex
=
3
;
this
.
picSVGPNG
.
TabIndex
=
3
;
this
.
picSVGPNG
.
TabStop
=
false
;
this
.
picSVGPNG
.
TabStop
=
false
;
//
//
...
@@ -212,7 +207,7 @@ namespace SvgW3CTestRunner
...
@@ -212,7 +207,7 @@ namespace SvgW3CTestRunner
this
.
picPng
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
13
);
this
.
picPng
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
13
);
this
.
picPng
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picPng
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
picPng
.
Name
=
"picPng"
;
this
.
picPng
.
Name
=
"picPng"
;
this
.
picPng
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
3
75
);
this
.
picPng
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
3
69
);
this
.
picPng
.
TabIndex
=
2
;
this
.
picPng
.
TabIndex
=
2
;
this
.
picPng
.
TabStop
=
false
;
this
.
picPng
.
TabStop
=
false
;
//
//
...
@@ -228,12 +223,67 @@ namespace SvgW3CTestRunner
...
@@ -228,12 +223,67 @@ namespace SvgW3CTestRunner
// label4
// label4
//
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
38
8
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
38
2
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
13
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
13
);
this
.
label4
.
TabIndex
=
4
;
this
.
label4
.
TabIndex
=
4
;
this
.
label4
.
Text
=
"SVG vs PNG"
;
this
.
label4
.
Text
=
"SVG vs PNG"
;
//
//
// bottomTabBox
//
this
.
bottomTabBox
.
Alignment
=
System
.
Windows
.
Forms
.
TabAlignment
.
Left
;
this
.
bottomTabBox
.
Controls
.
Add
(
this
.
outputTab
);
this
.
bottomTabBox
.
Controls
.
Add
(
this
.
descriptionTab
);
this
.
bottomTabBox
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
774
);
this
.
bottomTabBox
.
Multiline
=
true
;
this
.
bottomTabBox
.
Name
=
"bottomTabBox"
;
this
.
bottomTabBox
.
SelectedIndex
=
0
;
this
.
bottomTabBox
.
Size
=
new
System
.
Drawing
.
Size
(
1093
,
64
);
this
.
bottomTabBox
.
TabIndex
=
1
;
//
// outputTab
//
this
.
outputTab
.
Controls
.
Add
(
this
.
boxConsoleLog
);
this
.
outputTab
.
Location
=
new
System
.
Drawing
.
Point
(
42
,
4
);
this
.
outputTab
.
Name
=
"outputTab"
;
this
.
outputTab
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
outputTab
.
Size
=
new
System
.
Drawing
.
Size
(
1047
,
56
);
this
.
outputTab
.
TabIndex
=
0
;
this
.
outputTab
.
Text
=
"Output"
;
this
.
outputTab
.
UseVisualStyleBackColor
=
true
;
//
// boxConsoleLog
//
this
.
boxConsoleLog
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
boxConsoleLog
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
boxConsoleLog
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
boxConsoleLog
.
Name
=
"boxConsoleLog"
;
this
.
boxConsoleLog
.
ReadOnly
=
true
;
this
.
boxConsoleLog
.
Size
=
new
System
.
Drawing
.
Size
(
1041
,
50
);
this
.
boxConsoleLog
.
TabIndex
=
1
;
this
.
boxConsoleLog
.
Text
=
""
;
this
.
boxConsoleLog
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
boxConsoleLog_MouseDown
);
//
// descriptionTab
//
this
.
descriptionTab
.
Controls
.
Add
(
this
.
boxDescription
);
this
.
descriptionTab
.
Location
=
new
System
.
Drawing
.
Point
(
42
,
4
);
this
.
descriptionTab
.
Name
=
"descriptionTab"
;
this
.
descriptionTab
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
descriptionTab
.
Size
=
new
System
.
Drawing
.
Size
(
1047
,
56
);
this
.
descriptionTab
.
TabIndex
=
1
;
this
.
descriptionTab
.
Text
=
"Description"
;
this
.
descriptionTab
.
UseVisualStyleBackColor
=
true
;
//
// boxDescription
//
this
.
boxDescription
.
Location
=
new
System
.
Drawing
.
Point
(-
2
,
-
2
);
this
.
boxDescription
.
Name
=
"boxDescription"
;
this
.
boxDescription
.
ReadOnly
=
true
;
this
.
boxDescription
.
Size
=
new
System
.
Drawing
.
Size
(
1053
,
60
);
this
.
boxDescription
.
TabIndex
=
1
;
this
.
boxDescription
.
Text
=
""
;
//
// menuStrip1
// menuStrip1
//
//
this
.
menuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
menuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
...
@@ -263,7 +313,7 @@ namespace SvgW3CTestRunner
...
@@ -263,7 +313,7 @@ namespace SvgW3CTestRunner
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
13F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
13F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1279
,
8
77
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1279
,
8
65
);
this
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
MainMenuStrip
=
this
.
menuStrip1
;
...
@@ -281,6 +331,9 @@ namespace SvgW3CTestRunner
...
@@ -281,6 +331,9 @@ namespace SvgW3CTestRunner
this
.
tableLayoutPanel3
.
PerformLayout
();
this
.
tableLayoutPanel3
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picSVGPNG
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picSVGPNG
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picPng
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
picPng
)).
EndInit
();
this
.
bottomTabBox
.
ResumeLayout
(
false
);
this
.
outputTab
.
ResumeLayout
(
false
);
this
.
descriptionTab
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
PerformLayout
();
this
.
menuStrip1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
...
@@ -290,8 +343,6 @@ namespace SvgW3CTestRunner
...
@@ -290,8 +343,6 @@ namespace SvgW3CTestRunner
#
endregion
#
endregion
private
System
.
Windows
.
Forms
.
RichTextBox
boxConsoleLog
;
private
System
.
Windows
.
Forms
.
ListBox
lstFiles
;
private
System
.
Windows
.
Forms
.
ListBox
lstFiles
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
System
.
Windows
.
Forms
.
SplitContainer
splitContainer1
;
private
System
.
Windows
.
Forms
.
SplitContainer
splitContainer1
;
...
@@ -308,6 +359,11 @@ namespace SvgW3CTestRunner
...
@@ -308,6 +359,11 @@ namespace SvgW3CTestRunner
private
System
.
Windows
.
Forms
.
MenuStrip
menuStrip1
;
private
System
.
Windows
.
Forms
.
MenuStrip
menuStrip1
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
fIleToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
fIleToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
runAllToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
runAllToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
TabControl
bottomTabBox
;
private
System
.
Windows
.
Forms
.
TabPage
outputTab
;
private
System
.
Windows
.
Forms
.
RichTextBox
boxConsoleLog
;
private
System
.
Windows
.
Forms
.
TabPage
descriptionTab
;
private
System
.
Windows
.
Forms
.
RichTextBox
boxDescription
;
}
}
}
}
Tests/SvgW3CTestRunner/View.cs
View file @
ecda6766
...
@@ -5,6 +5,7 @@ using System.Linq;
...
@@ -5,6 +5,7 @@ using System.Linq;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
System.Drawing
;
using
System.Drawing
;
using
System.IO
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
Svg
;
using
Svg
;
using
System.Diagnostics
;
using
System.Diagnostics
;
...
@@ -90,10 +91,10 @@ namespace SvgW3CTestRunner
...
@@ -90,10 +91,10 @@ namespace SvgW3CTestRunner
var
img
=
new
Bitmap
(
480
,
360
);
var
img
=
new
Bitmap
(
480
,
360
);
doc
.
Draw
(
img
);
doc
.
Draw
(
img
);
picSvg
.
Image
=
img
;
picSvg
.
Image
=
img
;
}
}
this
.
boxConsoleLog
.
AppendText
(
"\n\nWC3 TEST "
+
fileName
+
"\n"
);
this
.
boxConsoleLog
.
AppendText
(
"\n\nWC3 TEST "
+
fileName
+
"\n"
);
this
.
boxDescription
.
Text
=
GetDescription
(
doc
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -154,11 +155,33 @@ namespace SvgW3CTestRunner
...
@@ -154,11 +155,33 @@ namespace SvgW3CTestRunner
//MessageBox.Show(ex.ToString(), "SVG Comparison");
//MessageBox.Show(ex.ToString(), "SVG Comparison");
picSVGPNG
.
Image
=
null
;
picSVGPNG
.
Image
=
null
;
}
}
}
private
SvgElement
GetChildWithDescription
(
SvgElement
element
,
string
description
)
{
var
docElements
=
element
.
Children
.
Where
(
child
=>
child
is
NonSvgElement
&&
(
child
as
NonSvgElement
).
Name
==
description
);
return
docElements
.
Count
()
>
0
?
docElements
.
First
()
:
null
;
}
private
string
GetDescription
(
SvgDocument
document
)
{
string
description
=
string
.
Empty
;
var
testCaseElement
=
GetChildWithDescription
(
document
,
"SVGTestCase"
);
if
(
testCaseElement
!=
null
)
{
var
descriptionElement
=
GetChildWithDescription
(
testCaseElement
,
"testDescription"
);
if
(
descriptionElement
!=
null
)
{
var
regex
=
new
Regex
(
"\r\n *"
);
var
descriptionLines
=
new
List
<
string
>();
foreach
(
var
child
in
descriptionElement
.
Children
)
{
descriptionLines
.
Add
(
regex
.
Replace
(
child
.
Content
,
" "
));
}
return
string
.
Join
(
"\n"
,
descriptionLines
.
ToArray
());
}
}
return
description
;
}
}
unsafe
Bitmap
PixelDiff
(
Bitmap
a
,
Bitmap
b
)
unsafe
Bitmap
PixelDiff
(
Bitmap
a
,
Bitmap
b
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment