Merge "Fixing tests to handle changes in our behaviour since DOM 3." into froyo