@@ -290,46 +290,46 @@ public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_I
290
290
Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
291
291
}
292
292
293
- [ TestMethod ]
294
- public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_Nested_InSameBlock ( )
295
- {
296
- string input1 = "<html><head><style type=\" text/css\" >table.child td { color: #00F; } table.parent td { color: #0F0; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
297
- string input2 = "<html><head><style type=\" text/css\" >table.parent td { color: #0F0; } table.child td { color: #00F; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
298
-
299
- var premailedOutput1 = PreMailer . MoveCssInline ( input1 , false ) ;
300
- var premailedOutput2 = PreMailer . MoveCssInline ( input2 , false ) ;
301
-
302
- Assert . IsTrue ( premailedOutput1 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
303
- Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #00F\" >test</td>" ) ) ;
304
- }
305
-
306
- [ TestMethod ]
307
- public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_InSeparateBlocks ( )
308
- {
309
- string input1 = "<html><head><style type=\" text/css\" >table.acolor td { color: #00F; }</style><style type=\" text/css\" >table.bcolor td { color: #0F0; }</style></head><body><table class=\" acolor bcolor\" ><tr><td>test</td></tr></table></body></html>" ;
310
- string input2 = "<html><head><style type=\" text/css\" >table.bcolor td { color: #0F0; }</style><style type=\" text/css\" >table.acolor td { color: #00F; }</style></head><body><table class=\" acolor bcolor\" ><tr><td>test</td></tr></table></body></html>" ;
311
-
312
- var premailedOutput1 = PreMailer . MoveCssInline ( input1 , false ) ;
313
- var premailedOutput2 = PreMailer . MoveCssInline ( input2 , false ) ;
314
-
315
- Assert . IsTrue ( premailedOutput1 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
316
- Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #00F\" >test</td>" ) ) ;
317
- }
318
-
319
- [ TestMethod ]
320
- public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_Nested_InSeparateBlocks ( )
321
- {
322
- string input1 = "<html><head><style type=\" text/css\" >table.child td { color: #00F; } table.parent td { color: #00F; }</style><style type=\" text/css\" >table.parent td { color: #0F0; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
323
- string input2 = "<html><head><style type=\" text/css\" >table.parent td { color: #0F0; } table.child td { color: #0F0; }</style><style type=\" text/css\" >table.child td { color: #00F; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
324
-
325
- var premailedOutput1 = PreMailer . MoveCssInline ( input1 , false ) ;
326
- var premailedOutput2 = PreMailer . MoveCssInline ( input2 , false ) ;
327
-
328
- Assert . IsTrue ( premailedOutput1 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
329
- Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #00F\" >test</td>" ) ) ;
330
- }
331
-
332
- [ TestMethod ]
293
+ [ TestMethod ]
294
+ public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_Nested_InSameBlock ( )
295
+ {
296
+ string input1 = "<html><head><style type=\" text/css\" >table.child td { color: #00F; } table.parent td { color: #0F0; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
297
+ string input2 = "<html><head><style type=\" text/css\" >table.parent td { color: #0F0; } table.child td { color: #00F; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
298
+
299
+ var premailedOutput1 = PreMailer . MoveCssInline ( input1 , false ) ;
300
+ var premailedOutput2 = PreMailer . MoveCssInline ( input2 , false ) ;
301
+
302
+ Assert . IsTrue ( premailedOutput1 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
303
+ Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #00F\" >test</td>" ) ) ;
304
+ }
305
+
306
+ [ TestMethod ]
307
+ public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_InSeparateBlocks ( )
308
+ {
309
+ string input1 = "<html><head><style type=\" text/css\" >table.acolor td { color: #00F; }</style><style type=\" text/css\" >table.bcolor td { color: #0F0; }</style></head><body><table class=\" acolor bcolor\" ><tr><td>test</td></tr></table></body></html>" ;
310
+ string input2 = "<html><head><style type=\" text/css\" >table.bcolor td { color: #0F0; }</style><style type=\" text/css\" >table.acolor td { color: #00F; }</style></head><body><table class=\" acolor bcolor\" ><tr><td>test</td></tr></table></body></html>" ;
311
+
312
+ var premailedOutput1 = PreMailer . MoveCssInline ( input1 , false ) ;
313
+ var premailedOutput2 = PreMailer . MoveCssInline ( input2 , false ) ;
314
+
315
+ Assert . IsTrue ( premailedOutput1 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
316
+ Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #00F\" >test</td>" ) ) ;
317
+ }
318
+
319
+ [ TestMethod ]
320
+ public void MoveCssInline_LaterPositionStylesWithEqualSpecificityHasPrecedence_Nested_InSeparateBlocks ( )
321
+ {
322
+ string input1 = "<html><head><style type=\" text/css\" >table.child td { color: #00F; } table.parent td { color: #00F; }</style><style type=\" text/css\" >table.parent td { color: #0F0; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
323
+ string input2 = "<html><head><style type=\" text/css\" >table.parent td { color: #0F0; } table.child td { color: #0F0; }</style><style type=\" text/css\" >table.child td { color: #00F; }</style></head><body><table class=\" parent\" ><tr><td><table class=\" child\" ><tr><td>test</td></tr></table></td></tr></table></body></html>" ;
324
+
325
+ var premailedOutput1 = PreMailer . MoveCssInline ( input1 , false ) ;
326
+ var premailedOutput2 = PreMailer . MoveCssInline ( input2 , false ) ;
327
+
328
+ Assert . IsTrue ( premailedOutput1 . Html . Contains ( "<td style=\" color: #0F0\" >test</td>" ) ) ;
329
+ Assert . IsTrue ( premailedOutput2 . Html . Contains ( "<td style=\" color: #00F\" >test</td>" ) ) ;
330
+ }
331
+
332
+ [ TestMethod ]
333
333
public void AddAnalyticsTags_AddsTags ( )
334
334
{
335
335
const string input = @"<div><a href=""http://blah.com/someurl"">Some URL</a><a>No href</a></div><div><a href=""http://blah.com/someurl?extra=1"">Extra Stuff</a><a href=""{{Handlebars}}"">Don't Touch</a></div>" ;
0 commit comments