| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/macros.h" |
| 5 #include "base/strings/string_util.h" | 6 #include "base/strings/string_util.h" |
| 6 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" | 7 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" |
| 7 #include "extensions/common/extension.h" | 8 #include "extensions/common/extension.h" |
| 8 #include "extensions/common/manifest_constants.h" | 9 #include "extensions/common/manifest_constants.h" |
| 9 #include "extensions/common/manifest_url_handlers.h" | 10 #include "extensions/common/manifest_url_handlers.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 namespace errors = extensions::manifest_errors; | 13 namespace errors = extensions::manifest_errors; |
| 13 | 14 |
| 14 class HomepageURLManifestTest : public ChromeManifestTest { | 15 class HomepageURLManifestTest : public ChromeManifestTest { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 40 // can be different in testing, so we just check the part before id. | 41 // can be different in testing, so we just check the part before id. |
| 41 extension = LoadAndExpectSuccess("homepage_google_hosted.json"); | 42 extension = LoadAndExpectSuccess("homepage_google_hosted.json"); |
| 42 EXPECT_TRUE(base::StartsWith( | 43 EXPECT_TRUE(base::StartsWith( |
| 43 extensions::ManifestURL::GetHomepageURL(extension.get()).spec(), | 44 extensions::ManifestURL::GetHomepageURL(extension.get()).spec(), |
| 44 "https://chrome.google.com/webstore/detail/", | 45 "https://chrome.google.com/webstore/detail/", |
| 45 base::CompareCase::INSENSITIVE_ASCII)); | 46 base::CompareCase::INSENSITIVE_ASCII)); |
| 46 | 47 |
| 47 extension = LoadAndExpectSuccess("homepage_externally_hosted.json"); | 48 extension = LoadAndExpectSuccess("homepage_externally_hosted.json"); |
| 48 EXPECT_EQ(GURL(), extensions::ManifestURL::GetHomepageURL(extension.get())); | 49 EXPECT_EQ(GURL(), extensions::ManifestURL::GetHomepageURL(extension.get())); |
| 49 } | 50 } |
| OLD | NEW |