Cross Reference: /yui3/src/common/tests/prep.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
<!doctype html>
<html>
<head>
<title>Test Prep</title>
</head>
<body>
<script type="text/javascript" src="/build/yui/yui.js"></script>
<script>
YUI({
filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min'
}).use('test', function(Y) {
var suite = new Y.Test.Suite('Test Prep Suite');
suite.add(new Y.Test.Case({
name: 'Test Prep',
'test: prep': function() {
/*
This hack is for Selenium to resize the window to a
larger size and focus it. Then it will start executing tests.
*/
window.moveTo(10, 10);
window.resizeTo(1000, 1000);
window.focus();
Y.Assert.isTrue(true, 'Test passed');
}
}));
Y.Test.Runner.add(suite);
Y.Test.Runner.setName('Test Prep Suite');
Y.Test.Runner.run();
});
</script>
</body>
</html>