Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <script src="../resources/js-test.js"></script> | 2 <script src="../resources/js-test.js"></script> |
| 3 <script> | 3 <script> |
| 4 description("Tests doppler deprecation messages"); | 4 description("Tests doppler deprecation messages"); |
| 5 | 5 |
| 6 var context = new AudioContext(); | 6 var context = new AudioContext(); |
| 7 var listener = context.listener; | 7 var listener = context.listener; |
| 8 var panner = context.createPanner(); | 8 var panner = context.createPanner(); |
| 9 | 9 |
| 10 shouldBe("listener.dopplerFactor", "1"); | 10 shouldBeUndefined("listener.dopplerFactor"); |
| 11 evalAndLog("listener.dopplerFactor = 2"); | 11 shouldBeUndefined("listener.speedOfSound"); |
|
hongchan
2016/09/29 20:58:28
Hmm. Is this necessary?
foolip
2016/09/29 21:13:05
My view is that this kind of test isn't very valua
| |
| 12 shouldBe("listener.dopplerFactor", "2"); | |
| 13 | 12 |
| 14 shouldBe("listener.speedOfSound", "343.3"); | 13 shouldThrow("listener.setVelocity(0, 0, 0)"); |
|
foolip
2016/09/29 21:13:05
Checking that the method doesn't exist would be mo
| |
| 15 evalAndLog("listener.speedOfSound = 400"); | 14 shouldThrow("panner.setVelocity(0, 0, 0)"); |
| 16 shouldBe("listener.speedOfSound", "400"); | |
| 17 | |
| 18 evalAndLog("listener.setVelocity(0, 0, 0)"); | |
| 19 | |
| 20 evalAndLog("panner.setVelocity(0, 0, 0)"); | |
| 21 </script> | 15 </script> |
| OLD | NEW |