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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
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/strings/string_util.h" 5 #include "base/strings/string_util.h"
6 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" 6 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h"
7 #include "extensions/common/extension.h" 7 #include "extensions/common/extension.h"
8 #include "extensions/common/manifest_constants.h" 8 #include "extensions/common/manifest_constants.h"
9 #include "extensions/common/manifest_url_handlers.h" 9 #include "extensions/common/manifest_url_handlers.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 21 matching lines...) Expand all
32 32
33 TEST_F(HomepageURLManifestTest, GetHomepageURL) { 33 TEST_F(HomepageURLManifestTest, GetHomepageURL) {
34 scoped_refptr<extensions::Extension> extension( 34 scoped_refptr<extensions::Extension> extension(
35 LoadAndExpectSuccess("homepage_valid.json")); 35 LoadAndExpectSuccess("homepage_valid.json"));
36 EXPECT_EQ(GURL("http://foo.com#bar"), 36 EXPECT_EQ(GURL("http://foo.com#bar"),
37 extensions::ManifestURL::GetHomepageURL(extension.get())); 37 extensions::ManifestURL::GetHomepageURL(extension.get()));
38 38
39 // The Google Gallery URL ends with the id, which depends on the path, which 39 // The Google Gallery URL ends with the id, which depends on the path, which
40 // can be different in testing, so we just check the part before id. 40 // can be different in testing, so we just check the part before id.
41 extension = LoadAndExpectSuccess("homepage_google_hosted.json"); 41 extension = LoadAndExpectSuccess("homepage_google_hosted.json");
42 EXPECT_TRUE(base::StartsWithASCII( 42 EXPECT_TRUE(base::StartsWith(
43 extensions::ManifestURL::GetHomepageURL(extension.get()).spec(), 43 extensions::ManifestURL::GetHomepageURL(extension.get()).spec(),
44 "https://chrome.google.com/webstore/detail/", false)); 44 "https://chrome.google.com/webstore/detail/",
45 base::CompareCase::INSENSITIVE_ASCII));
45 46
46 extension = LoadAndExpectSuccess("homepage_externally_hosted.json"); 47 extension = LoadAndExpectSuccess("homepage_externally_hosted.json");
47 EXPECT_EQ(GURL(), extensions::ManifestURL::GetHomepageURL(extension.get())); 48 EXPECT_EQ(GURL(), extensions::ManifestURL::GetHomepageURL(extension.get()));
48 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698