fix order issue when trusted content is mixed with other siblings,

fix js error when child is a random object
make home demo more minimalist
add explanation about modules in guide
This commit is contained in:
Leo Horie 2014-10-31 09:31:01 -04:00
parent c7d6b40575
commit c980fd9b66
7 changed files with 51 additions and 9 deletions

View file

@ -1,3 +1,6 @@
//make "use strict" and nodejs happy
var window = this
//test reporting for saucelabs
if (typeof window != "undefined") {
window.global_test_results = {
@ -19,7 +22,7 @@ function test(condition) {
var result = true
test.total++
if (this.performance != null && performance.now) {
if (typeof performance != "undefined" && performance.now) {
start = performance.now()
}
try {
@ -30,11 +33,11 @@ function test(condition) {
console.error(e)
test.failures.push(condition)
}
if (this.performance != null && performance.now) {
if (typeof performance != "undefined" && performance.now) {
duration = performance.now() - start
}
test_obj = {
window.test_obj = {
name: "" + test.total,
result: result,
duration: duration
@ -42,7 +45,7 @@ function test(condition) {
if (typeof window != "undefined") {
if (!result) {
window.global_test_results.tests.push(test_obj)
window.global_test_results.tests.push(window.test_obj)
}
window.global_test_results.duration += duration