(layoutName)
| 86 | } |
| 87 | |
| 88 | function testLayout(layoutName) { |
| 89 | var placeholder1 = document.getElementById("test1"), |
| 90 | placeholder2 = document.getElementById("test2"), |
| 91 | expectedLayout = WinJS.UI[layoutName], |
| 92 | listView1 = new ListView(placeholder1, { layout: { type: expectedLayout } }), |
| 93 | listView2 = new ListView(placeholder2, { layout: new expectedLayout() }); |
| 94 | |
| 95 | Helper.ListView.validateListView(listView1); |
| 96 | Helper.ListView.validateListView(listView2); |
| 97 | LiveUnit.Assert.isTrue(listView1.layout instanceof expectedLayout); |
| 98 | LiveUnit.Assert.isTrue(listView2.layout instanceof expectedLayout); |
| 99 | LiveUnit.Assert.isTrue(listView1._horizontal() === (layoutName.indexOf("GridLayout") == 0)); |
| 100 | LiveUnit.Assert.isTrue(listView2._horizontal() === (layoutName.indexOf("GridLayout") == 0)); |
| 101 | } |
| 102 | |
| 103 | export class InitializationTests { |
| 104 |
no test coverage detected