Masters Thesis: Self-containment
The best advice I heard about this is: Write the thesis in the way you would like to have had it at hand when you started your thesis. Imagine yourself in a situation that you are a master's student and want to learn about the very topic of your actual thesis. What detail do you need? What background should you give? What literature should you refer to? 

I often hear students say that their advisors do not really care about these issues, and indeed it's somehow true. As an advisor, you care much more about the content. This does not mean that the presentation does not matter, but it is not that much about what background you give, but how. Do you treat simple things at length but brush over more difficult things without proper reference? Do you provide proofs for standard facts but use advanced concepts without any argument?