tests/auto/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
  2195     setHtml("<div style=\"font-family: 'Foo Bar';\">Test</div>");
  2195     setHtml("<div style=\"font-family: 'Foo Bar';\">Test</div>");
  2196     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
  2196     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
  2197 
  2197 
  2198     setHtml("<div style='font-family: \"Foo Bar\";'>Test</div>");
  2198     setHtml("<div style='font-family: \"Foo Bar\";'>Test</div>");
  2199     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
  2199     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
       
  2200 
       
  2201     setHtml("<div style='font-family: \"Foo  Bar\";'>Test</div>");
       
  2202     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo  Bar"));
       
  2203 
       
  2204     setHtml("<div style='font-family: Foo\n  Bar;'>Test</div>");
       
  2205     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
       
  2206 
       
  2207     setHtml("<div style='font-family: Foo\n  Bar, serif, \"bar foo\";'>Test</div>");
       
  2208     QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar,serif,bar foo"));
       
  2209 
  2200 }
  2210 }
  2201 
  2211 
  2202 void tst_QTextDocumentFragment::defaultFont()
  2212 void tst_QTextDocumentFragment::defaultFont()
  2203 {
  2213 {
  2204     QFont f;
  2214     QFont f;