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

Unified Diff: chrome/browser/android/webapk/manifest_upgrade_detector_unittest.cc

Issue 2124513002: Introduce ManifestUpgradeDetector for WebAPK to detect web manifest changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up. Created 4 years, 5 months 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/browser/android/webapk/manifest_upgrade_detector_unittest.cc
diff --git a/chrome/browser/android/webapk/manifest_upgrade_detector_unittest.cc b/chrome/browser/android/webapk/manifest_upgrade_detector_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..330140e1ad5522de27223800802f05c872f51999
--- /dev/null
+++ b/chrome/browser/android/webapk/manifest_upgrade_detector_unittest.cc
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/webapk/manifest_upgrade_detector.h"
+#include "content/public/common/manifest.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using ManifestUpgradeDetectorTest = testing::Test;
+
+TEST_F(ManifestUpgradeDetectorTest,
+ OnDidGetManifestReturnsFalseWhenTheFetchedManifestUrlIsEmpty) {
+ ManifestUpgradeDetector detector(nullptr, jobject(), nullptr, GURL(), GURL());
+ EXPECT_EQ(ManifestUpgradeDetector::NoErrorDetected, detector.error_code());
+
+ content::Manifest manifest;
+ detector.OnDidGetManifest(GURL(), manifest);
+ EXPECT_EQ(ManifestUpgradeDetector::FetchedManifestEmpty,
+ detector.error_code());
+}

Powered by Google App Engine
This is Rietveld 408576698