Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2524)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java

Issue 1441553002: Generating CIDs in Blink during MHTML serialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-per-frame-page-serializer-only
Patch Set: Rebasing... Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java
index d99121d6f410d1f0553bbb7965c1b5dba0b6346d..f3580fd56c98f4783130675fb844211f39ac82a6 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java
@@ -91,9 +91,18 @@ public class OfflinePageBridgeTest extends ChromeActivityTestCaseBase<ChromeActi
offlinePage.getOfflineUrl().endsWith(".mhtml"));
assertTrue("Offline page item offline file doesn't have the right name.",
offlinePage.getOfflineUrl().contains("About"));
- // BUG(518758): Depending on the bot the result will be either 626 or 627.
+
+ // We don't care about the exact file size of the mhtml file:
+ // - exact file size is not something that the end user sees or cares about
+ // - exact file size can vary based on external factors (i.e. see crbug.com/518758)
+ // - verification of contents of the resulting mhtml file should be covered by mhtml
+ // serialization tests (i.e. save_page_browsertest.cc)
+ // - we want to avoid overtesting and artificially requiring specific formatting and/or
+ // implementation choices in the mhtml serialization code
+ // OTOH, it still seems useful to assert that the file is not empty and that its size is in
+ // the right ballpark.
long size = offlinePage.getFileSize();
- assertTrue("Offline page item size is incorrect: " + size, size == 626 || size == 627);
+ assertTrue("Offline page item size is incorrect: " + size, 600 < size && size < 800);
}
@MediumTest
« no previous file with comments | « no previous file | chrome/browser/download/save_page_browsertest.cc » ('j') | third_party/WebKit/Source/core/page/PageSerializer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698