Browse Source

Re-apply old change which was excluded from master

The merge script was faulty between May and June 2013 and merged changes
individually from both 7.0 and 7.1 to master. In the case that a commit from
7.0 was merged right before there was a "Merge: no" commit in 7.1, the changes
between the "Merge: no" commit and the previous merge point from 7.1 to master was
potentially never merged (the whole chain was merged as a no-op).

The only affected change seems to be

0a437a5 Revert "Replaced css inject hack in TestUtils with Page.Styles.add() #11798"
b008768 Implement parenthesis-handling fixes for Sass in Vaadin 7.1 (#12834)

The former one is re-applied in this commit, the latter one has been verified to be in
the master branch

Change-Id: If0cd75d75fdfc8893ac501aab2a0be1b55b09dcc
tags/7.2.0
Artur Signell 10 years ago
parent
commit
35c174cfe6
1 changed files with 12 additions and 3 deletions
  1. 12
    3
      uitest/src/com/vaadin/tests/util/TestUtils.java

+ 12
- 3
uitest/src/com/vaadin/tests/util/TestUtils.java View File

@@ -99,13 +99,22 @@ public class TestUtils {
"YE", "ZAMBIA", "ZM", "ZIMBABWE", "ZW" };

/**
* Injects css into the current window. Can be used to keep tests css in
* source files.
* Crossbrowser hack to dynamically add css current window. Can be used to
* keep tests css in source files.
*
* @param cssString
*/
public static void injectCSS(UI w, String cssString) {
w.getPage().getStyles().add(cssString);
String script = "if ('\\v'=='v') /* ie only */ {\n"
+ " document.createStyleSheet().cssText = '"
+ cssString
+ "';\n"
+ " } else {var tag = document.createElement('style'); tag.type = 'text/css';"
+ " document.getElementsByTagName('head')[0].appendChild(tag);tag[ (typeof "
+ "document.body.style.WebkitAppearance=='string') /* webkit only */ ? 'innerText' "
+ ": 'innerHTML'] = '" + cssString + "';}";

w.getPage().getJavaScript().execute(script);
}

public static void installPerformanceReporting(TextArea targetTextArea) {

Loading…
Cancel
Save