Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / svg / hixie / perf / 003.xml
1 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="400" height="400" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()">
2  <script xlink:href="../../../fast/repaint/resources/text-based-repaint.js"></script>
3  <script type="text/javascript">
4   var start = new Date();
5  </script>
6  <text x="10" y="15" font-weight="900" font-size="5">SVG Performance test.</text>
7  <text x="10" y="95" font-weight="900" font-size="5">Test not started.</text>
8  <rect x="0" y="0" height="100" width="100" stroke="black" fill="none"/>
9  <script type="text/javascript"><![CDATA[
10   var svg = document.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'svg')[0];
11   var t = document.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'text')[1];
12
13   var Xs = new Array(9, 65, 92, 30, 92, 40, 65, 47, 79, 10, 77, 45,
14     27, 13, 43, 52, 55, 46, 1, 24, 42, 11, 15, 18, 42, 49, 50, 30, 69,
15     95, 36, 49, 46, 85, 54, 26, 15, 56, 18, 92, 40, 41, 66, 85, 7, 47,
16     66, 13, 72, 29, 48, 57, 61, 46, 70, 3, 62, 34, 74, 13, 32, 20, 8,
17     2, 60, 97, 58, 1, 0, 89, 85, 48, 52, 98, 12, 26, 5, 5, 48, 19, 22,
18     34, 83, 13, 65, 77, 23, 40, 56, 65, 13, 54, 81, 10, 53, 25, 93,
19     61, 14, 7);
20
21   var Ys = new Array(42, 80, 93, 30, 54, 33, 76, 56, 2, 79, 37, 80,
22     80, 19, 99, 31, 89, 22, 23, 42, 27, 81, 26, 19, 80, 6, 62, 67, 73,
23     18, 69, 10, 42, 88, 100, 99, 47, 88, 26, 46, 49, 60, 7, 10, 48, 29,
24     25, 26, 33, 73, 84, 24, 42, 74, 5, 49, 69, 81, 19.5, 67, 10, 53, 79,
25     56, 32, 98, 78, 7, 3, 68, 12, 80, 42, 24, 82, 69, 9, 43, 47, 19,
26     69, 45, 41, 64, 1, 39, 25, 84, 35, 77, 26, 43, 32, 75, 89, 66, 48,
27     80, 1, 70);
28
29   var Ss = new Array(5, 3, 1, 3, 1, 8, 8, 7, 8, 5, 1, 4, 4, 2, 1, 2,
30     2, 6, 4, 3, 1, 5, 1, 2, 6, 1, 5, 7, 3, 6, 6, 4, 7, 2, 5, 3, 5, 3,
31     5, 2, 8, 1, 2, 1, 6, 4, 3, 2, 4, 8, 3, 5, 8, 8, 2, 2, 2, 8, 5, 6,
32     4, 8, 5, 3, 6, 2, 3, 2, 3, 6, 3, 5, 8, 7, 2, 4, 8, 8, 6, 4, 6, 1,
33     8, 6, 7, 4, 7, 8, 3, 7, 7, 8, 4, 2, 2, 8, 2, 8, 7, 3);
34
35   var Rs = new Array(157, 142, 37, 13, 349, 83, 158, 214, 34, 353,
36     196, 29, 296, 225, 124, 355, 68, 305, 315, 190, 146, 274, 167,
37     132, 298, 272, 266, 265, 28, 213, 99, 260, 323, 233, 111, 270,
38     165, 177, 58, 350, 322, 137, 163, 80, 206, 138, 20, 355, 32, 310,
39     309, 260, 153, 309, 151, 189, 52, 170, 326, 157, 65, 41, 28, 92,
40     96, 196, 250, 313, 125, 226, 63, 245, 158, 196, 7, 169, 96, 224,
41     222, 273, 37, 26, 331, 302, 57, 55, 171, 347, 319, 54, 83, 189,
42     281, 79, 75, 138, 223, 138, 238, 69);
43
44   var delay = 1;
45   var idealTime = 50;
46   var maxPerBlock = Xs.length / (idealTime / delay);
47   var maxBlocks = Xs.length / maxPerBlock;
48   var count = 0;
49   function repaintTest() {
50     for (var subcount = 0; subcount < maxPerBlock; subcount += 1) {
51       var index = count * maxPerBlock + subcount;
52       var newT = document.createElementNS('http://www.w3.org/2000/svg', 'text');
53       newT.setAttribute('x', Xs[index]);
54       newT.setAttribute('y', Ys[index]);
55       newT.setAttribute('font-size', Ss[index]);
56       newT.setAttribute('fill', 'aqua');
57       newT.setAttribute('transform', 'translate(50, 50) rotate(' + Rs[index] + ') translate(-50, -50)');
58       newT.appendChild(document.createTextNode(index));
59       svg.appendChild(newT);
60     }
61     ++count;
62     if (count < maxBlocks) {
63       if (window.testRunner)
64         repaintTest();
65       else {
66         window.setTimeout(repaintTest, delay);
67         t.firstChild.data = 'Test in progress... ' + count + ' of ' + maxBlocks;
68       }
69     } else {
70       if (window.testRunner)
71         t.firstChild.data = 'Test completed';
72       else {
73         var end = new Date();
74         var elapsed = (end - start) / 1000;
75         t.firstChild.data = 'Test completed in ' + elapsed.toFixed(2) + 's.';
76         if (parent.reportResults) parent.reportResults(end - start);
77       }
78     }
79   }
80  ]]></script>
81 </svg>