Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a3207b0

Browse files
committed
fixup! Implement InHeadNoscript context
1 parent 99e9264 commit a3207b0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

html5lib/tests/tree_construction.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def runtest(self):
9696
fragmentContainer = self.test['document-fragment']
9797
expected = convertExpected(self.test['document'])
9898
expectedErrors = self.test['errors'].split("\n") if self.test['errors'] else []
99+
99100
scripting = False
100101
if 'script-on' in self.test:
101102
scripting = True
@@ -156,13 +157,17 @@ def runtest(self):
156157
fragmentContainer = self.test['document-fragment']
157158
expected = convertExpected(self.test['document'])
158159

160+
scripting = False
161+
if 'script-on' in self.test:
162+
scripting = True
163+
159164
with warnings.catch_warnings():
160165
warnings.simplefilter("error")
161166
try:
162167
if fragmentContainer:
163-
document = p.parseFragment(input, fragmentContainer)
168+
document = p.parseFragment(input, fragmentContainer, scripting=scripting)
164169
else:
165-
document = p.parse(input)
170+
document = p.parse(input, scripting=scripting)
166171
except constants.DataLossWarning:
167172
pytest.skip("data loss warning")
168173

0 commit comments

Comments
 (0)