Skip to content

Commit

Permalink
Merge pull request #2 from foolip/tpl2tc
Browse files Browse the repository at this point in the history
Make tpl2tc.py actually generate the checked-in files
  • Loading branch information
deniak committed Jan 21, 2014
2 parents 13fd05a + 41ba54a commit 5942d9c
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 33 deletions.
7 changes: 4 additions & 3 deletions html/semantics/embedded-content-0/media-elements/common.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#media sources
dataurl_src = "'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQAAAAAAAAA'"

mp4_src = "/media/preload.mp4?pipe=trickle(100000:d1:r2)&nocache=' + Math.random()";
ogg_src = "/media/preload.ogv?pipe=trickle(100000:d1:r2)&nocache=' + Math.random()";
webm_src = "/media/preload.webm?pipe=trickle(100000:d1:r2)&nocache=' + Math.random()";
throttler = "'/media/preload.%s?pipe=trickle(100000:d1:r2)&nocache=' + Math.random()";
mp4_src = throttler % 'mp4'
ogg_src = throttler % 'ogv'
webm_src = throttler % 'webm'

#preload="auto" event orders
auto_event_order = '/^loadstart (progress )+loadedmetadata (progress )*loadeddata (progress )*canplay (progress )*canplaythrough $/g'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
});
});
</script>

Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
});
});
</script>

Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
});
});
</script>

Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
});
});
</script>

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
$include preload-metadata-to-none-after-src-readystate.tpl

Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
}
});
});
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ tests.forEach(function(vars) {
}
});
});
</script>
</script>
4 changes: 3 additions & 1 deletion html/semantics/embedded-content-0/media-elements/tpl2tc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def create_test(template_dir, template_filename):
template_file = open(os.path.join(template_dir, template_filename), 'r')
file_contents = template_file.read()
template_file.close()
pattern = re.compile('^\$include (.+)$', re.M)
pattern = re.compile('^\$include (.+)\n', re.M)
try:
file_contents = re.sub(pattern, get_included_template(template_dir), file_contents)
except IOError as e:
Expand Down Expand Up @@ -105,6 +105,8 @@ def create_test(template_dir, template_filename):
def get_testsuite(template_dir, template_filename):
if os.path.join(template_dir, template_filename) in common.testsuite:
testsuite = common.testsuite[os.path.join(template_dir, template_filename)]
elif template_dir == '.' and template_filename in common.testsuite:
testsuite = common.testsuite[template_filename]
elif template_dir in common.testsuite:
testsuite = common.testsuite[template_dir]
else:
Expand Down

0 comments on commit 5942d9c

Please sign in to comment.