New platform/device discovery code in CL.js + a new test case