Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: third_party/libxslt/python/tests/basic.py

Issue 1193533007: Upgrade to libxml 2.9.2 and libxslt 1.1.28 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove suppressions, have landed in blink now Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/python -u
2 import sys
3 import libxml2
4 # Memory debug specific
5 libxml2.debugMemory(1)
6 import libxslt
7
8
9
10 styledoc = libxml2.parseFile("test.xsl")
11 style = libxslt.parseStylesheetDoc(styledoc)
12 doc = libxml2.parseFile("test.xml")
13 result = style.applyStylesheet(doc, None)
14 style.saveResultToFilename("foo", result, 0)
15 stringval = style.saveResultToString(result)
16 if (len(stringval) != 68):
17 print "Error in saveResultToString"
18 sys.exit(255)
19 style.freeStylesheet()
20 doc.freeDoc()
21 result.freeDoc()
22
23 # Memory debug specific
24 libxslt.cleanup()
25 if libxml2.debugMemory(1) == 0:
26 print "OK"
27 else:
28 print "Memory leak %d bytes" % (libxml2.debugMemory(1))
29 libxml2.dumpMemory()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698