Bug 729940 - Part 0a: Fix test error messages in localstorage/sessionstorage tests. r=honzab
authorJustin Lebar <justin.lebar@gmail.com>
Sun, 04 Mar 2012 13:49:41 -0500
changeset 88220 a108aee4f00d7a6bbc427f3bd3f317cb53ac121e
parent 88219 058ac6b6930be019d8605512b387ac907d56f82a
child 88221 939fd023e9a48df3419e94a1bfa268c306e22a39
push id6746
push userjlebar@mozilla.com
push dateSun, 04 Mar 2012 18:50:25 +0000
treeherdermozilla-inbound@d75775dfc565 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershonzab
bugs729940
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 729940 - Part 0a: Fix test error messages in localstorage/sessionstorage tests. r=honzab
dom/tests/mochitest/localstorage/test_localStorageBase.html
dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing.html
dom/tests/mochitest/localstorage/test_localStorageBaseSessionOnly.html
dom/tests/mochitest/sessionstorage/test_sessionStorageBase.html
--- a/dom/tests/mochitest/localstorage/test_localStorageBase.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageBase.html
@@ -95,17 +95,17 @@ function startTest()
   localStorage.setItem("key2", "value2");
   is(localStorage.length, 2, "The storage has two key-value pairs");
   is(localStorage.getItem("key1"), "value1");
   is(localStorage.getItem("key2"), "value2");
   var firstKey = localStorage.key(0);
   var secondKey = localStorage.key(1);
   ok((firstKey == 'key1' && secondKey == 'key2') ||
      (firstKey == 'key2' && secondKey == 'key1'),
-     'Both keys should be present.');
+     'key() API works.');
 
   // change the second key
   localStorage.setItem("key2", "value2-2");
   is(localStorage.length, 2, "The storage has two key-value pairs");
   is(localStorage.key(0), firstKey); // After key value changes the order must be preserved
   is(localStorage.key(1), secondKey);
   checkException(function() {localStorage.key(-1);}, INDEX_SIZE_ERR);
   checkException(function() {localStorage.key(2);}, INDEX_SIZE_ERR);
--- a/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing.html
@@ -114,17 +114,17 @@ function doTest()
   localStorage.setItem("key2", "value2");
   is(localStorage.length, 2, "The storage has two key-value pairs");
   is(localStorage.getItem("key1"), "value1");
   is(localStorage.getItem("key2"), "value2");
   var firstKey = localStorage.key(0);
   var secondKey = localStorage.key(1);
   ok((firstKey == 'key1' && secondKey == 'key2') ||
      (firstKey == 'key2' && secondKey == 'key1'),
-     'Both keys should be present.');
+     'key() API works.');
 
   // change the second key
   localStorage.setItem("key2", "value2-2");
   is(localStorage.length, 2, "The storage has two key-value pairs");
   is(localStorage.key(0), firstKey); // After key value changes the order must be preserved
   is(localStorage.key(1), secondKey);
   checkException(function() {localStorage.key(-1);}, INDEX_SIZE_ERR);
   checkException(function() {localStorage.key(2);}, INDEX_SIZE_ERR);
--- a/dom/tests/mochitest/localstorage/test_localStorageBaseSessionOnly.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageBaseSessionOnly.html
@@ -105,17 +105,17 @@ function startTest()
   localStorage.setItem("key2", "value2");
   is(localStorage.length, 2, "The storage has two key-value pairs");
   is(localStorage.getItem("key1"), "value1");
   is(localStorage.getItem("key2"), "value2");
   var firstKey = localStorage.key(0);
   var secondKey = localStorage.key(1);
   ok((firstKey == 'key1' && secondKey == 'key2') ||
      (firstKey == 'key2' && secondKey == 'key1'),
-     'Both keys should be present.');
+     'key() API works.');
 
   // change the second key
   localStorage.setItem("key2", "value2-2");
   is(localStorage.length, 2, "The storage has two key-value pairs");
   is(localStorage.key(0), firstKey); // After key value changes the order must be preserved
   is(localStorage.key(1), secondKey);
   checkException(function() {localStorage.key(-1);}, INDEX_SIZE_ERR);
   checkException(function() {localStorage.key(2);}, INDEX_SIZE_ERR);
--- a/dom/tests/mochitest/sessionstorage/test_sessionStorageBase.html
+++ b/dom/tests/mochitest/sessionstorage/test_sessionStorageBase.html
@@ -97,17 +97,17 @@ function startTest()
   sessionStorage.setItem("key2", "value2");
   is(sessionStorage.length, 2, "The storage has two key-value pairs");
   is(sessionStorage.getItem("key1"), "value1");
   is(sessionStorage.getItem("key2"), "value2");
   var firstKey = sessionStorage.key(0);
   var secondKey = sessionStorage.key(1);
   ok((firstKey == 'key1' && secondKey == 'key2') ||
      (firstKey == 'key2' && secondKey == 'key1'),
-     'Both keys should be present.');
+     'key() API works.');
 
   // change the second key
   sessionStorage.setItem("key2", "value2-2");
   is(sessionStorage.length, 2, "The storage has two key-value pairs");
   is(sessionStorage.key(0), firstKey); // After key value changes the order must be preserved
   is(sessionStorage.key(1), secondKey);
   checkException(function() {sessionStorage.key(-1);}, INDEX_SIZE_ERR);
   checkException(function() {sessionStorage.key(2);}, INDEX_SIZE_ERR);