Bug 1153262 - Remove length comparison from testReadingListCache. r=gijs, a=sledru
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 10 Apr 2015 08:26:15 -0700
changeset 265542 09089c7cd48ed4e848e1f09787fed44afca7daa1
parent 265541 ebaaded5b7704c26d29c98a3e3d3b4ec2b96e6dd
child 265543 5c3653da0663fe05111a72b011d80a553b93d806
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs, sledru
bugs1153262
milestone39.0a2
Bug 1153262 - Remove length comparison from testReadingListCache. r=gijs, a=sledru
mobile/android/base/tests/testReadingListCache.js
--- a/mobile/android/base/tests/testReadingListCache.js
+++ b/mobile/android/base/tests/testReadingListCache.js
@@ -15,30 +15,28 @@ const URL_PREFIX = "http://mochi.test:88
 
 let TEST_PAGES = [
   {
     url: URL_PREFIX + "basic_article.html",
     expected: {
       title: "Article title",
       byline: "by Jane Doe",
       excerpt: "This is the article description.",
-      length: 1931
     }
   },
   {
     url: URL_PREFIX + "not_an_article.html",
     expected: null
   },
   {
     url: URL_PREFIX + "developer.mozilla.org/en/XULRunner/Build_Instructions.html",
     expected: {
       title: "Building XULRunner | MDN",
       byline: null,
       excerpt: "XULRunner is built using basically the same process as Firefox or other applications. Please read and follow the general Build Documentation for instructions on how to get sources and set up build prerequisites.",
-      length: 2300
     }
   },
 ];
 
 add_task(function* test_article_not_found() {
   let article = yield ReaderMode.getArticleFromCache(TEST_PAGES[0].url);
   do_check_eq(article, null);
 });
@@ -46,17 +44,16 @@ add_task(function* test_article_not_foun
 add_task(function* test_store_article() {
   // Create an article object to store in the cache.
   yield ReaderMode.storeArticleInCache({
     url: TEST_PAGES[0].url,
     content: "Lorem ipsum",
     title: TEST_PAGES[0].expected.title,
     byline: TEST_PAGES[0].expected.byline,
     excerpt: TEST_PAGES[0].expected.excerpt,
-    length: TEST_PAGES[0].expected.length
   });
 
   let article = yield ReaderMode.getArticleFromCache(TEST_PAGES[0].url);
   checkArticle(article, TEST_PAGES[0]);
 });
 
 add_task(function* test_remove_article() {
   yield ReaderMode.removeArticleFromCache(TEST_PAGES[0].url);
@@ -92,17 +89,16 @@ add_task(function* test_migrate_cache() 
     let store = transaction.objectStore("articles");
 
     let request = store.add({
       url: TEST_PAGES[0].url,
       content: "Lorem ipsum",
       title: TEST_PAGES[0].expected.title,
       byline: TEST_PAGES[0].expected.byline,
       excerpt: TEST_PAGES[0].expected.excerpt,
-      length: TEST_PAGES[0].expected.length
     });
     request.onerror = event => reject(request.error);
     request.onsuccess = event => resolve();
   });
 
   // Migrate the cache.
   yield Reader.migrateCache();
 
@@ -118,12 +114,11 @@ function checkArticle(article, testcase)
   }
 
   do_check_neq(article, null);
   do_check_eq(!!article.content, true); // A bit of a hack to avoid spamming the test log.
   do_check_eq(article.url, testcase.url);
   do_check_eq(article.title, testcase.expected.title);
   do_check_eq(article.byline, testcase.expected.byline);
   do_check_eq(article.excerpt, testcase.expected.excerpt);
-  do_check_eq(article.length, testcase.expected.length);
 }
 
 run_next_test();