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 258445 2ffc047abd90
parent 258444 7081bbd2b331
child 258446 b54c44cfa07e
push id4669
push userryanvm@gmail.com
push date2015-04-13 16:55 +0000
treeherdermozilla-beta@333017ad43a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs, sledru
bugs1153262
milestone38.0
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();