forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
67 lines (59 loc) · 1.72 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!doctype html>
<meta charset=utf-8>
<title>Perf Tests</title>
<script>
window.onerror = function(error){
window._unhandledError = error;
window.isDone = true;
}
</script>
<script src="./lib/perf-test-runner.browser.js"></script>
<script> perfRunner.Polyfill(); </script>
<script src="../build/react.js"></script>
<script src="../build/JSXTransformer.js"></script>
<script src="../test/lib/postDataToURL.browser.js"></script>
<script src="./lib/BrowserPerfRunnerContext.react.js"></script>
<script src="./lib/BrowserPerfRunnerApp.react.js"></script>
<script>
var tests = [
"sanity.js",
"todolist-mount.js",
"todolist-edit.js",
"todolist-add.js",
"todolist-do-stuff.js",
"setState-callback-5.js",
"setState-callback.js",
"basic-div.js",
"basic-unmount.js",
"propTypes.js",
"renderComponent-basic.js",
"shouldComponentUpdate.js",
];
var reactVersions = [
'edge',
'builds/master/latest'
];
window.onload = function(){
window.isDone = false;
React.renderComponent(
BrowserPerfRunnerApp({
headless: perfRunner.getQueryParamArrayOrDefault('headless', [false])[0],
react: perfRunner.getQueryParamArrayOrDefault('react', reactVersions),
tests: perfRunner.getQueryParamArrayOrDefault('test', tests),
maxTime: perfRunner.getQueryParamArrayOrDefault('maxTime', [5])[0],
onCompleteEach: function(results){
console.log('onCompleteEach', results);
postDataToURL({type:'perf', message:results}, '/reportTestResults');
},
onError: function(error){
window._unhandledError = error;
},
onComplete: function(results){
window.completedTestKeys = Object.keys(results);
window.isDone = true;
}
}),
document.body
);
}
</script>