OLD | NEW |
---|---|
1 description( | 1 description( |
2 "This test checks construction of objects with custom constructors." | 2 "This test checks construction of objects with custom constructors." |
3 ); | 3 ); |
4 | 4 |
5 // Image tests | 5 // Image tests |
6 shouldBeNonNull("new Image()"); | 6 shouldBeNonNull("new Image()"); |
7 shouldBeEqualToString("new Image().tagName", "IMG"); | 7 shouldBeEqualToString("new Image().tagName", "IMG"); |
8 | 8 |
9 shouldBe("new Image().height", "0"); | 9 shouldBe("new Image().height", "0"); |
10 shouldBe("new Image().width", "0"); | 10 shouldBe("new Image().width", "0"); |
(...skipping 25 matching lines...) Expand all Loading... | |
36 shouldBeEqualToString("new Option('somedata').innerText", "somedata"); | 36 shouldBeEqualToString("new Option('somedata').innerText", "somedata"); |
37 | 37 |
38 shouldBeEqualToString("new Option().value", ""); | 38 shouldBeEqualToString("new Option().value", ""); |
39 shouldBeEqualToString("new Option('somedata', null).value", "null"); | 39 shouldBeEqualToString("new Option('somedata', null).value", "null"); |
40 shouldBeEqualToString("new Option('somedata', undefined).value", "somedata"); | 40 shouldBeEqualToString("new Option('somedata', undefined).value", "somedata"); |
41 shouldBeEqualToString("new Option('somedata', 'somevalue').value", "somevalue"); | 41 shouldBeEqualToString("new Option('somedata', 'somevalue').value", "somevalue"); |
42 | 42 |
43 shouldBeFalse("new Option().defaultSelected"); | 43 shouldBeFalse("new Option().defaultSelected"); |
44 shouldBeFalse("new Option('somedata', 'somevalue').defaultSelected"); | 44 shouldBeFalse("new Option('somedata', 'somevalue').defaultSelected"); |
45 shouldBeFalse("new Option('somedata', 'somevalue', false).defaultSelected"); | 45 shouldBeFalse("new Option('somedata', 'somevalue', false).defaultSelected"); |
46 shouldBeFalse("new Option('somedata', 'somevalue', false, false).defaultSelected "); | |
philipj_slow
2015/06/26 14:28:38
I don't think testing that the |selected| argument
| |
46 shouldBeTrue("new Option('somedata', 'somevalue', true).defaultSelected"); | 47 shouldBeTrue("new Option('somedata', 'somevalue', true).defaultSelected"); |
48 shouldBeTrue("new Option('somedata', 'somevalue', true, false).defaultSelected") ; | |
49 shouldBeTrue("new Option('somedata', 'somevalue', true, true).defaultSelected"); | |
47 | 50 |
48 shouldBeFalse("new Option().selected"); | 51 shouldBeFalse("new Option().selected"); |
49 shouldBeFalse("new Option('somedata', 'somevalue').selected"); | 52 shouldBeFalse("new Option('somedata', 'somevalue').selected"); |
50 shouldBeFalse("new Option('somedata', 'somevalue', false).selected"); | 53 shouldBeFalse("new Option('somedata', 'somevalue', false).selected"); |
51 shouldBeFalse("new Option('somedata', 'somevalue', true).selected"); | 54 shouldBeFalse("new Option('somedata', 'somevalue', true).selected"); |
52 shouldBeFalse("new Option('somedata', 'somevalue', true, false).selected"); | 55 shouldBeFalse("new Option('somedata', 'somevalue', true, false).selected"); |
53 shouldBeTrue("new Option('somedata', 'somevalue', true, true).selected"); | 56 shouldBeTrue("new Option('somedata', 'somevalue', true, true).selected"); |
54 | 57 |
55 shouldBeEqualToString("new Option().outerHTML","<option></option>"); | 58 shouldBeEqualToString("new Option().outerHTML","<option></option>"); |
56 shouldBeEqualToString("new Option('somedata', 'somevalue', false).outerHTML.repl ace(/\"/g,\"'\")", "<option value='somevalue'>somedata</option>"); | 59 shouldBeEqualToString("new Option('somedata', 'somevalue', false).outerHTML.repl ace(/\"/g,\"'\")", "<option value='somevalue'>somedata</option>"); |
57 shouldBeEqualToString("new Option('somedata', 'somevalue', true).outerHTML.repla ce(/\"/g,\"'\")", "<option value='somevalue' selected=''>somedata</option>"); | 60 shouldBeEqualToString("new Option('somedata', 'somevalue', true).outerHTML.repla ce(/\"/g,\"'\")", "<option value='somevalue' selected=''>somedata</option>"); |
58 | 61 |
59 // Audio tests | 62 // Audio tests |
60 shouldBeNonNull("new Audio()"); | 63 shouldBeNonNull("new Audio()"); |
61 shouldBeEqualToString("new Audio().tagName", "AUDIO"); | 64 shouldBeEqualToString("new Audio().tagName", "AUDIO"); |
62 | 65 |
63 shouldBeEqualToString("new Audio().src", ""); | 66 shouldBeEqualToString("new Audio().src", ""); |
64 shouldBeEqualToString("new Audio().preload", "auto"); | 67 shouldBeEqualToString("new Audio().preload", "auto"); |
65 shouldBeEqualToString("new Audio('http://127.0.0.1/someurl').src", "http://127.0 .0.1/someurl"); | 68 shouldBeEqualToString("new Audio('http://127.0.0.1/someurl').src", "http://127.0 .0.1/someurl"); |
66 shouldBeEqualToString("new Audio('http://127.0.0.1/someurl').preload", "auto"); | 69 shouldBeEqualToString("new Audio('http://127.0.0.1/someurl').preload", "auto"); |
OLD | NEW |