A test is never required for God to know if we have faith... after all, it's He who gives us faith in the first place. A test of faith is something that brings the faith we've been given to the surface.. so we can see it.
I don't think God created an offensive idiom. And anyway, what makes you think such an idiom was offensive to the people of that time? As I already told you, different cultures have different ways of putting things which may 'seem' offensive to us but not to them. Jesus said many words that seem harsh and hard to us, in fact, God doesn't muck around, He calls a spade a spade. Isn't that part of real love? Jesus was never 'soft' on people. Compassionate and loving, but not soft.
Sure. But He hadn't died on the cross yet to forgive the sins of the whole world. At that stage it was only given to Israel to make the sacrifices forshadowing His sacrifice on the cross. It was Israel's belief in what God was 'going' to do on the cross that saved them. This woman was not an Israelite and didn't partake in Israel's sacrificial system. But she had faith in Him anyway.. sort of like a forshadowing of how the rest of the world as Gentiles would believe on Him.
That's why it's so important to study the bible, not only read it. If you study parts of Leviticus and Deuteronomy you will pick up what is meant by 'dog', etc. And that it means the Gentiles were 'unclean' because their sins were not forgiven by the offerings of sacrifice to God (the shed blood). Someone 'unclean' was considered as unclean as a dog or a pig and if you read Acts chapter 11, Peter is given a vision of a great sheet coming down out of heaven full of all sorts of animals (the Gentiles). God tells him that they were not to consider these things 'unclean' anymore.. that in fact, when a Gentile (unclean person) comes to faith in Christ he is considered clean (and part of the commonwealth of Israel).
If God were to write the Bible in our day, who's culture would He pick to write it in? Would the language/idioms of the Arabic world be the same as ours? Even the language or idioms of England are different to the idioms of America and Australia. Some of them can also be 'offensive' to us if we don't take the time to learn,
Jesus knew she had the faith to believe He could heal her daughter but gave her a test to see how much faith she had. A Canaanite was a Gentile, and all Gentiles were called 'dogs'... a Hebrew idiom. He said He came only to Israel.. she knew she was a Gentile and not an Israelite. This is why she answered that even the dogs under the table got crumbs. When we read the bible we have to take into consideration that what we see as rudeness or a wierd way of speech is normal to those times and to that culture. In fact Jesus gave this woman great respect.