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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc

Issue 11624036: Move the parsing of homepage_url" and "devtools_page" out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years 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/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc
deleted file mode 100644
index 59836afebfa2ca74f3ba227d12df7dda6f03190f..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2012 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/common/extensions/manifest_tests/extension_manifest_test.h"
-
-#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/l10n/l10n_util.h"
-
-namespace errors = extension_manifest_errors;
-
-TEST_F(ExtensionManifestTest, ParseHomepageURLs) {
- scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("homepage_valid.json"));
-
- Testcase testcases[] = {
- Testcase("homepage_empty.json",
- errors::kInvalidHomepageURL),
- Testcase("homepage_invalid.json",
- errors::kInvalidHomepageURL),
- Testcase("homepage_bad_schema.json",
- errors::kInvalidHomepageURL)
- };
- RunTestcases(testcases, arraysize(testcases),
- EXPECT_TYPE_ERROR);
-}
-
-TEST_F(ExtensionManifestTest, GetHomepageURL) {
- scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("homepage_valid.json"));
- EXPECT_EQ(GURL("http://foo.com#bar"), extension->GetHomepageURL());
-
- // The Google Gallery URL ends with the id, which depends on the path, which
- // can be different in testing, so we just check the part before id.
- extension = LoadAndExpectSuccess("homepage_google_hosted.json");
- EXPECT_TRUE(StartsWithASCII(extension->GetHomepageURL().spec(),
- "https://chrome.google.com/webstore/detail/",
- false));
-
- extension = LoadAndExpectSuccess("homepage_externally_hosted.json");
- EXPECT_EQ(GURL(), extension->GetHomepageURL());
-}

Powered by Google App Engine
This is Rietveld 408576698