|
25 | 25 | 'use strict'; |
26 | 26 |
|
27 | 27 | var test = require('tape'); |
28 | | -var DOMElement = require('../DOMElement'); |
29 | 28 |
|
30 | | - |
31 | | -var IDENT = [ |
32 | | - 1, 0, 0, 0, |
33 | | - 0, 1, 0, 0, |
34 | | - 0, 0, 1, 0, |
35 | | - 0, 0, 0, 1 |
36 | | -]; |
37 | | - |
38 | | -function createMockNode() { |
39 | | - return { |
40 | | - sentDrawCommands: [], |
41 | | - sendDrawCommand: function(command) { |
42 | | - this.sentDrawCommands.push(command); |
43 | | - }, |
44 | | - shown: true, |
45 | | - isShown: function() { |
46 | | - return this.shown; |
47 | | - }, |
48 | | - addedComponent: false, |
49 | | - addComponent: function() { |
50 | | - this.addedComponent = true; |
51 | | - }, |
52 | | - location: 'body/0', |
53 | | - getLocation: function() { |
54 | | - return this.location; |
55 | | - }, |
56 | | - transform: IDENT, |
57 | | - getTransform: function() { |
58 | | - return this.transform; |
59 | | - }, |
60 | | - requestedUpdate: false, |
61 | | - requestUpdate: function() { |
62 | | - this.requestedUpdate = true; |
63 | | - }, |
64 | | - size: [0, 0, 0], |
65 | | - getSize: function() { |
66 | | - return this.size; |
67 | | - }, |
68 | | - sizeMode: [0, 0, 0], |
69 | | - getSizeMode: function() { |
70 | | - return this.sizeMode; |
71 | | - }, |
72 | | - uiEvents: [], |
73 | | - getUIEvents: function() { |
74 | | - return this.uiEvents; |
75 | | - }, |
76 | | - opacity: 1, |
77 | | - getOpacity: function() { |
78 | | - return this.opacity; |
79 | | - } |
80 | | - }; |
81 | | -} |
82 | | - |
83 | | -function createMountedDOMElement() { |
84 | | - var node = createMockNode(); |
85 | | - var domElement = new DOMElement(node); |
86 | | - domElement.onMount(node, 0); |
87 | | - domElement.onUpdate(); |
88 | | - node.sentDrawCommands.length = 0; |
89 | | - return domElement; |
90 | | -} |
| 29 | +// var DOMElement = require('../DOMElement'); |
| 30 | +// |
| 31 | +// |
| 32 | +// var IDENT = [ |
| 33 | +// 1, 0, 0, 0, |
| 34 | +// 0, 1, 0, 0, |
| 35 | +// 0, 0, 1, 0, |
| 36 | +// 0, 0, 0, 1 |
| 37 | +// ]; |
| 38 | +// |
| 39 | +// function createMockNode() { |
| 40 | +// return { |
| 41 | +// sentDrawCommands: [], |
| 42 | +// sendDrawCommand: function(command) { |
| 43 | +// this.sentDrawCommands.push(command); |
| 44 | +// }, |
| 45 | +// shown: true, |
| 46 | +// isShown: function() { |
| 47 | +// return this.shown; |
| 48 | +// }, |
| 49 | +// addedComponent: false, |
| 50 | +// addComponent: function() { |
| 51 | +// this.addedComponent = true; |
| 52 | +// }, |
| 53 | +// location: 'body/0', |
| 54 | +// getLocation: function() { |
| 55 | +// return this.location; |
| 56 | +// }, |
| 57 | +// transform: IDENT, |
| 58 | +// getTransform: function() { |
| 59 | +// return this.transform; |
| 60 | +// }, |
| 61 | +// requestedUpdate: false, |
| 62 | +// requestUpdate: function() { |
| 63 | +// this.requestedUpdate = true; |
| 64 | +// }, |
| 65 | +// size: [0, 0, 0], |
| 66 | +// getSize: function() { |
| 67 | +// return this.size; |
| 68 | +// }, |
| 69 | +// sizeMode: [0, 0, 0], |
| 70 | +// getSizeMode: function() { |
| 71 | +// return this.sizeMode; |
| 72 | +// }, |
| 73 | +// uiEvents: [], |
| 74 | +// getUIEvents: function() { |
| 75 | +// return this.uiEvents; |
| 76 | +// }, |
| 77 | +// opacity: 1, |
| 78 | +// getOpacity: function() { |
| 79 | +// return this.opacity; |
| 80 | +// } |
| 81 | +// }; |
| 82 | +// } |
| 83 | +// |
| 84 | +// function createMountedDOMElement() { |
| 85 | +// var node = createMockNode(); |
| 86 | +// var domElement = new DOMElement(node); |
| 87 | +// domElement.onMount(node, 0); |
| 88 | +// domElement.onUpdate(); |
| 89 | +// node.sentDrawCommands.length = 0; |
| 90 | +// return domElement; |
| 91 | +// } |
91 | 92 |
|
92 | 93 | test('DOMElement', function(t) { |
93 | 94 | // t.test('constructor', function(t) { |
|
0 commit comments