summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorMike Pennisi <mike@mikepennisi.com>2015-06-08 15:35:16 -0400
committerMike Pennisi <mike@mikepennisi.com>2015-07-07 13:18:55 -0400
commitab7617deddec3025848ac69ebdea6389b94e9a92 (patch)
treeed465dd578cc92a23991ffe2aa0399649074fa56 /website
parentc6ac3908682247326e098c5834537c5a279e9a60 (diff)
downloadqtdeclarative-testsuites-ab7617deddec3025848ac69ebdea6389b94e9a92.tar.gz
Implement `raw` flag
Some tests involving the directive prologue are invalidated by source text transformations that insert executable code in the beginning of the script. Implement a `raw` flag that allows these tests to opt-out of this transformation. Update the relevant tests to use this flag (and remove references to globals only available when code is injected). Update the Python runner accordingly: - Do not run tests marked as "raw" in strict mode - Reject invalid test configurations Update the browser runner accordingly: - Do not modify the script body of tests marked as "raw"
Diffstat (limited to 'website')
-rw-r--r--website/scripts/sth.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/website/scripts/sth.js b/website/scripts/sth.js
index f55f437fa..26b440795 100644
--- a/website/scripts/sth.js
+++ b/website/scripts/sth.js
@@ -272,7 +272,8 @@ function BrowserRunner() {
BrowserRunner.prototype.compileSource = function(test, code) {
var flags = test.flags;
- if (flags && flags.indexOf("onlyStrict") > -1) {
+ if (flags && flags.indexOf("raw") === -1 &&
+ flags.indexOf("onlyStrict") > -1) {
code = "'use strict';\n" + code;
}