Chromium Code Reviews| 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) { |
|
pkotwicz
2016/07/20 20:57:04
This is on the border of what should be unit teste
pkotwicz
2016/07/22 20:13:05
Still deferring to Yaron
pkotwicz
2016/07/25 17:35:52
Yaron bump!
Yaron
2016/07/25 18:00:21
Not sure why JNI code is a problem - the Java code
Xi Han
2016/07/25 20:01:37
I would prefer to simply to remove this test. For
|
| + 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()); |
| +} |