aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/jstestdriver/JsTestDriver.jarbin3698736 -> 3168906 bytes
-rw-r--r--scenario/Runner-compiled.html2
-rw-r--r--src/Parser.js2
-rw-r--r--src/scenario/Scenario.js20
-rw-r--r--test/scenario/dslSpec.js4
5 files changed, 17 insertions, 11 deletions
diff --git a/lib/jstestdriver/JsTestDriver.jar b/lib/jstestdriver/JsTestDriver.jar
index c32dae01..cb30a6dc 100644
--- a/lib/jstestdriver/JsTestDriver.jar
+++ b/lib/jstestdriver/JsTestDriver.jar
Binary files differ
diff --git a/scenario/Runner-compiled.html b/scenario/Runner-compiled.html
index 98dbea69..f5f76fde 100644
--- a/scenario/Runner-compiled.html
+++ b/scenario/Runner-compiled.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <script type="text/javascript" src="../angular-scenario.js"></script>
+ <script type="text/javascript" src="../build/angular-scenario.js"></script>
<script type="text/javascript" src="widgets-scenario.js"></script>
</head>
<body>
diff --git a/src/Parser.js b/src/Parser.js
index 7ad65f32..8dc8f9c2 100644
--- a/src/Parser.js
+++ b/src/Parser.js
@@ -93,7 +93,7 @@ function lex(text, parseStringsForObjects){
}
function isWhitespace(ch) {
return ch == ' ' || ch == '\r' || ch == '\t' ||
- ch == '\n' || ch == '\v';
+ ch == '\n' || ch == '\v' || ch == '\u00A0'; // IE treats non-breaking space as \u00A0
}
function isIdent(ch) {
return 'a' <= ch && ch <= 'z' ||
diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js
index b1782cf2..57fece6e 100644
--- a/src/scenario/Scenario.js
+++ b/src/scenario/Scenario.js
@@ -64,7 +64,7 @@ angular.scenario.matcher = angular.scenario.matcher || function(name, fn) {
prefix += 'not ';
}
var self = this;
- this.addFuture(prefix + name + ' ' + angular.toJson(expected),
+ this.addFuture(prefix + name + ' ' + angular.toJson(expected),
function(done) {
var error;
self.actual = self.future.value;
@@ -129,7 +129,7 @@ function formatException(error, maxStackLines) {
}
/**
- * Returns a function that gets the file name and line number from a
+ * Returns a function that gets the file name and line number from a
* location in the stack if available based on the call site.
*
* Note: this returns another function because accessing .stack is very
@@ -137,10 +137,10 @@ function formatException(error, maxStackLines) {
*/
function callerFile(offset) {
var error = new Error();
-
+
return function() {
var line = (error.stack || '').split('\n')[offset];
-
+
// Clean up the stack trace line
if (line) {
if (line.indexOf('@') !== -1) {
@@ -151,7 +151,7 @@ function callerFile(offset) {
line = line.substring(line.indexOf('(')+1).replace(')', '');
}
}
-
+
return line || '';
};
}
@@ -188,6 +188,12 @@ function browserTrigger(element, type) {
type = 'change';
}
if (msie) {
+ switch(element.type) {
+ case 'radio':
+ case 'checkbox':
+ element.checked = !element.checked;
+ break;
+ }
element.fireEvent('on' + type);
} else {
var evnt = document.createEvent('MouseEvents');
@@ -200,9 +206,9 @@ function browserTrigger(element, type) {
* Don't use the jQuery trigger method since it works incorrectly.
*
* jQuery notifies listeners and then changes the state of a checkbox and
- * does not create a real browser event. A real click changes the state of
+ * does not create a real browser event. A real click changes the state of
* the checkbox and then notifies listeners.
- *
+ *
* To work around this we instead use our own handler that fires a real event.
*/
_jQuery.fn.trigger = function(type) {
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index 0d523ad3..e3e06b3e 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -222,11 +222,11 @@ describe("angular.scenario.dsl", function() {
});
it('should execute custom query', function() {
- doc.append('<a id="test" href="myUrl"></a>');
+ doc.append('<a id="test" href="http://example.com/myUrl"></a>');
$root.dsl.element('#test').query(function(elements, done) {
done(null, elements.attr('href'));
});
- expect($root.futureResult).toEqual('myUrl');
+ expect($root.futureResult).toEqual('http://example.com/myUrl');
});
});