Most always it is something electrical that causes any car fires, just like house fires.
A gasoline leak will only burn if there is an open flame or spark to ignite it. A hot surface will not light it, oils will light on a hot surface.
Just do the test.