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

Side by Side Diff: chrome/common/extensions/api/extension_api_unittest.cc

Issue 20081002: Remove experimental permission from infobars API and moving it to dev channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted the app.yaml version change Created 7 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 "chrome/common/extensions/api/extension_api.h" 5 #include "chrome/common/extensions/api/extension_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 EXPECT_EQ(NULL, apis->GetSchema(std::string())); 304 EXPECT_EQ(NULL, apis->GetSchema(std::string()));
305 EXPECT_EQ(NULL, apis->GetSchema(std::string())); 305 EXPECT_EQ(NULL, apis->GetSchema(std::string()));
306 EXPECT_EQ(NULL, apis->GetSchema("experimental")); 306 EXPECT_EQ(NULL, apis->GetSchema("experimental"));
307 EXPECT_EQ(NULL, apis->GetSchema("experimental")); 307 EXPECT_EQ(NULL, apis->GetSchema("experimental"));
308 EXPECT_EQ(NULL, apis->GetSchema("foo")); 308 EXPECT_EQ(NULL, apis->GetSchema("foo"));
309 EXPECT_EQ(NULL, apis->GetSchema("foo")); 309 EXPECT_EQ(NULL, apis->GetSchema("foo"));
310 310
311 EXPECT_TRUE(apis->GetSchema("experimental.dns")); 311 EXPECT_TRUE(apis->GetSchema("experimental.dns"));
312 EXPECT_TRUE(apis->GetSchema("experimental.dns")); 312 EXPECT_TRUE(apis->GetSchema("experimental.dns"));
313 EXPECT_TRUE(apis->GetSchema("experimental.infobars"));
314 EXPECT_TRUE(apis->GetSchema("experimental.infobars"));
315 EXPECT_TRUE(apis->GetSchema("extension")); 313 EXPECT_TRUE(apis->GetSchema("extension"));
316 EXPECT_TRUE(apis->GetSchema("extension")); 314 EXPECT_TRUE(apis->GetSchema("extension"));
315 EXPECT_TRUE(apis->GetSchema("infobars"));
316 EXPECT_TRUE(apis->GetSchema("infobars"));
317 EXPECT_TRUE(apis->GetSchema("omnibox")); 317 EXPECT_TRUE(apis->GetSchema("omnibox"));
318 EXPECT_TRUE(apis->GetSchema("omnibox")); 318 EXPECT_TRUE(apis->GetSchema("omnibox"));
319 EXPECT_TRUE(apis->GetSchema("storage")); 319 EXPECT_TRUE(apis->GetSchema("storage"));
320 EXPECT_TRUE(apis->GetSchema("storage")); 320 EXPECT_TRUE(apis->GetSchema("storage"));
321 } 321 }
322 322
323 scoped_refptr<Extension> CreateExtensionWithPermissions( 323 scoped_refptr<Extension> CreateExtensionWithPermissions(
324 const std::set<std::string>& permissions) { 324 const std::set<std::string>& permissions) {
325 base::DictionaryValue manifest; 325 base::DictionaryValue manifest;
326 manifest.SetString("name", "extension"); 326 manifest.SetString("name", "extension");
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 GetDictionaryFromList(schema, "events", 0, &dict); 777 GetDictionaryFromList(schema, "events", 0, &dict);
778 GetDictionaryFromList(dict, "parameters", 0, &sub_dict); 778 GetDictionaryFromList(dict, "parameters", 0, &sub_dict);
779 EXPECT_TRUE(sub_dict->GetString("$ref", &type)); 779 EXPECT_TRUE(sub_dict->GetString("$ref", &type));
780 EXPECT_EQ("test.foo.TestType", type); 780 EXPECT_EQ("test.foo.TestType", type);
781 GetDictionaryFromList(dict, "parameters", 1, &sub_dict); 781 GetDictionaryFromList(dict, "parameters", 1, &sub_dict);
782 EXPECT_TRUE(sub_dict->GetString("$ref", &type)); 782 EXPECT_TRUE(sub_dict->GetString("$ref", &type));
783 EXPECT_EQ("fully.qualified.Type", type); 783 EXPECT_EQ("fully.qualified.Type", type);
784 } 784 }
785 785
786 } // namespace extensions 786 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698