I often see equation following:
$$\int_{-\infty}^{\infty} \delta(x) dx=1 =\int_{-\infty}^{\infty} 1 \cdot \delta(x) dx $$
But, as i know, The distribution isn't possible for any function; it is only for test function.
Then why the distribution above is reasonable?, isn't it the distribution for the non-zero function; with non-compact support??
If a distribution has compact support then the action of it can be extended to functions with non-compact support.
Let $u$ be a distribution with compact support, $\rho$ be a test function that has value $1$ on a neighborhood of the support of $u$, and $\phi$ be a $C^\infty$ function. Then we define $$ \langle u, \phi \rangle := \langle u, \rho\phi \rangle. $$ Note that $\rho\phi$ is a test function (with compact support) so the right hand side is defined.
Since different choices of $\rho$ only differ where $u$ vanishes, the right hand side above will not depend on the choice of $\rho$ so it's well-defined.