Bug 729940 - Part 0a: Fix test error messages in localstorage/sessionstorage tests. r=honzab
authorJustin Lebar <justin.lebar@gmail.com>
Sun, 04 Mar 2012 15:57:35 -0500
changeset 91117 cf668a3984fef3a56c4671dab84b4ae6f10010fc
parent 91116 b69617debd8d2d5a7686a7d61da5c0ab987eeb00
child 91118 f9f51c726fa700c932a2cac10b7d6ec7f3d41bfd
push id783
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:33:42 +0000
treeherdermozilla-beta@11faed19f136 [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);