Bug 1153262 - Remove length comparison from testReadingListCache, rs=gijs
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 10 Apr 2015 08:26:15 -0700
changeset 238543 45927c53ea1d65635f8b932ddc773b5000dc0061
parent 238542 7664c46f18f2ee2fb9d62d23eec57678e39fedf5
child 238544 481d6df1fdca70162d1e7b39739711177b99600e
push id12321
push usergijskruitbosch@gmail.com
push dateFri, 10 Apr 2015 17:14:29 +0000
treeherderfx-team@481d6df1fdca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1153262
milestone40.0a1
Bug 1153262 - Remove length comparison from testReadingListCache, rs=gijs
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();