summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/webui/test_api.js
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-25 23:48:33 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-25 23:48:33 +0000
commitc03e80d77b92ffdb43fb0eaabee55ef02fd26058 (patch)
tree11dabe6e78db47212c6a1cca3d1818dbdad03dc2 /chrome/test/data/webui/test_api.js
parent912aee1e088be4c6f25fa3afa0a090c69da5d191 (diff)
downloadchromium_src-c03e80d77b92ffdb43fb0eaabee55ef02fd26058.zip
chromium_src-c03e80d77b92ffdb43fb0eaabee55ef02fd26058.tar.gz
chromium_src-c03e80d77b92ffdb43fb0eaabee55ef02fd26058.tar.bz2
Add a test for checking that refreshing a page does load the same WebUI page.
BUG=57485 TEST=this one. Review URL: http://codereview.chromium.org/6805003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82950 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/webui/test_api.js')
-rw-r--r--chrome/test/data/webui/test_api.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/test/data/webui/test_api.js b/chrome/test/data/webui/test_api.js
index ef5c0e1..eedbeb8 100644
--- a/chrome/test/data/webui/test_api.js
+++ b/chrome/test/data/webui/test_api.js
@@ -38,13 +38,12 @@
}
function assertEquals(expected, actual, message) {
- if (expected !== actual) {
- throw new Error('Test Error in ' + testName(currentTest) +
- '\nActual: ' + actual + '\nExpected: ' + expected +
- '\n' + message);
+ if (expected != actual) {
+ throw new Error('Test Error. Actual: ' + actual + '\nExpected: ' +
+ expected + '\n' + message);
}
if (typeof expected != typeof actual) {
- throw new Error('Test Error in ' + testName(currentTest) +
+ throw new Error('Test Error' +
' (type mismatch)\nActual Type: ' + typeof actual +
'\nExpected Type:' + typeof expected + '\n' + message);
}
@@ -59,7 +58,7 @@
console.log('Running test ' + currentTest.name);
currentTest.call();
} catch (e) {
- console.error(
+ console.log(
'Failed: ' + currentTest.name + '\nwith exception: ' + e.message);
fail(e.message);