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

Side by Side Diff: chrome/browser/extensions/api/discovery/discovery_api_unittest.cc

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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 // This file tests the chrome.alarms extension API. 5 // This file tests the chrome.alarms extension API.
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/api/discovery/discovery_api.h" 9 #include "chrome/browser/extensions/api/discovery/discovery_api.h"
10 #include "chrome/browser/extensions/api/discovery/suggested_link.h" 10 #include "chrome/browser/extensions/api/discovery/suggested_link.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 } // namespace 66 } // namespace
67 67
68 namespace extensions { 68 namespace extensions {
69 69
70 class ExtensionDiscoveryTest : public BrowserWithTestWindowTest { 70 class ExtensionDiscoveryTest : public BrowserWithTestWindowTest {
71 public: 71 public:
72 virtual void SetUp() { 72 virtual void SetUp() {
73 BrowserWithTestWindowTest::SetUp(); 73 BrowserWithTestWindowTest::SetUp();
74 extension_ = utils::CreateEmptyExtensionWithLocation(Extension::LOAD); 74 extension_ = utils::CreateEmptyExtensionWithLocation(Manifest::LOAD);
75 } 75 }
76 76
77 // Runs a function and returns a pointer to a value, transferring ownership. 77 // Runs a function and returns a pointer to a value, transferring ownership.
78 base::Value* RunFunctionWithExtension( 78 base::Value* RunFunctionWithExtension(
79 UIThreadExtensionFunction* function, const std::string& args) { 79 UIThreadExtensionFunction* function, const std::string& args) {
80 function->set_extension(extension_.get()); 80 function->set_extension(extension_.get());
81 return utils::RunFunctionAndReturnSingleResult(function, args, browser()); 81 return utils::RunFunctionAndReturnSingleResult(function, args, browser());
82 } 82 }
83 83
84 // Runs a function and ignores the return value. 84 // Runs a function and ignores the return value.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 extensions::SuggestedLinksRegistry* registry = 182 extensions::SuggestedLinksRegistry* registry =
183 extensions::SuggestedLinksRegistryFactory::GetForProfile( 183 extensions::SuggestedLinksRegistryFactory::GetForProfile(
184 browser()->profile()); 184 browser()->profile());
185 185
186 const SuggestedLinkList* links = registry->GetAll(GetExtensionId()); 186 const SuggestedLinkList* links = registry->GetAll(GetExtensionId());
187 ASSERT_EQ(0u, links->size()); 187 ASSERT_EQ(0u, links->size());
188 } 188 }
189 189
190 } // namespace extensions 190 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698