7b03a91259061659ecb2586b4e62b5de9aa398a6
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / resources / wrapper-identity-base.js
1 // We use a static list of window properties to avoid breaking when new properties are added.
2 var staticWindowProperties = [
3     'CSSPrimitiveValue',
4     'CSSRule',
5     'CSSStyleDeclaration',
6     'CSSCharsetRule',
7     'CSSImportRule',
8     'CSSMediaRule',
9     'CSSFontFaceRule',
10     'CSSPageRule',
11     'WebKitCSSKeyframeRule',
12     'WebKitCSSKeyframesRule',
13     'DOMException',
14     'DOMParser',
15     'Document',
16     'DocumentFragment',
17     'Element',
18     'EvalError',
19     'Event',
20     'HTMLAnchorElement',
21     'HTMLAppletElement',
22     'HTMLAreaElement',
23     'HTMLBRElement',
24     'HTMLBaseElement',
25     'HTMLBodyElement',
26     'HTMLButtonElement',
27     'HTMLCanvasElement',
28     'HTMLDListElement',
29     'HTMLDirectoryElement',
30     'HTMLDivElement',
31     'HTMLDocument',
32     'HTMLElement',
33     'HTMLFieldSetElement',
34     'HTMLFontElement',
35     'HTMLFormElement',
36     'HTMLHRElement',
37     'HTMLHeadElement',
38     'HTMLHeadingElement',
39     'HTMLHtmlElement',
40     'HTMLImageElement',
41     'HTMLInputElement',
42     'HTMLIsIndexElement',
43     'HTMLLIElement',
44     'HTMLLabelElement',
45     'HTMLLegendElement',
46     'HTMLLinkElement',
47     'HTMLMapElement',
48     'HTMLMenuElement',
49     'HTMLMetaElement',
50     'HTMLModElement',
51     'HTMLOListElement',
52     'HTMLOptGroupElement',
53     'HTMLOptionElement',
54     'HTMLParagraphElement',
55     'HTMLParamElement',
56     'HTMLPreElement',
57     'HTMLQuoteElement',
58     'HTMLScriptElement',
59     'HTMLSelectElement',
60     'HTMLStyleElement',
61     'HTMLTextAreaElement',
62     'HTMLTitleElement',
63     'HTMLUListElement',
64     'Image',
65     'MutationEvent',
66     'Node',
67     'NodeFilter',
68     'Option',
69     'Range',
70     'RangeError',
71     'ReferenceError',
72     'SyntaxError',
73     'TypeError',
74     'URIError',
75     'XMLDocument',
76     'XMLHttpRequest',
77     'XMLSerializer',
78     'XPathEvaluator',
79     'XPathResult',
80     'XSLTProcessor',
81     'addEventListener',
82     'alert',
83     'atob',
84     'blur',
85     'btoa',
86     'captureEvents',
87     'clearInterval',
88     'clearTimeout',
89     'clientInformation',
90     'close',
91     'closed',
92     'confirm',
93     'console',
94     'crypto',
95     'defaultStatus',
96     'defaultstatus',
97     'document',
98     'event',
99     'find',
100     'focus',
101     'frameElement',
102     'frames',
103     'getComputedStyle',
104     'getMatchedCSSRules',
105     'getSelection',
106     'history',
107     'location',
108     'locationbar',
109     'log',
110     'menubar',
111     'moveBy',
112     'moveTo',
113     'name',
114     'navigator',
115     'offscreenBuffering',
116     'onabort',
117     'onbeforeunload',
118     'onblur',
119     'onchange',
120     'onclick',
121     'ondblclick',
122     'onerror',
123     'onfocus',
124     'onkeydown',
125     'onkeypress',
126     'onkeyup',
127     'onload',
128     'onmousedown',
129     'onmousemove',
130     'onmouseout',
131     'onmouseover',
132     'onmouseup',
133     'onmousewheel',
134     'onreset',
135     'onresize',
136     'onscroll',
137     'onsearch',
138     'onselect',
139     'onsubmit',
140     'onunload',
141     'open',
142     'opener',
143     'parent',
144     'personalbar',
145     'print',
146     'prompt',
147     'releaseEvents',
148     'removeEventListener',
149     'resizeBy',
150     'resizeTo',
151     'screen',
152     'scroll',
153     'scrollBy',
154     'scrollTo',
155     'scrollbars',
156     'self',
157     'setInterval',
158     'setTimeout',
159     'showModalDialog',
160     'status',
161     'statusbar',
162     'stop',
163     'test',
164     'toolbar',
165     'top',
166     'window'
167 ];
168
169
170 function isEqualJS(a, b)
171 {
172     return a === b;
173 }
174
175 function isEqualObjC(a, b)
176 {
177     return Boolean(objCController.identityIsEqual(a, b));
178 }
179
180 function testJS(s)
181 {
182     shouldBeTrue("var object = " + s + "; isEqualJS(object, object);");
183 }
184
185 function testObjC(s)
186 {
187     shouldBeTrue("var object = " + s + "; isEqualObjC(object, object);");
188 }