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

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

Issue 10966025: Change bookmarkManager API from experimental to private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmarkManager->bookmarkManagerPrivate Created 8 years, 3 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 #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_path.h" 10 #include "base/file_path.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 std::string child_name; 328 std::string child_name;
329 } test_data[] = { 329 } test_data[] = {
330 { "", "", "" }, 330 { "", "", "" },
331 { "unknown", "", "" }, 331 { "unknown", "", "" },
332 { "bookmarks", "bookmarks", "" }, 332 { "bookmarks", "bookmarks", "" },
333 { "bookmarks.", "bookmarks", "" }, 333 { "bookmarks.", "bookmarks", "" },
334 { ".bookmarks", "", "" }, 334 { ".bookmarks", "", "" },
335 { "bookmarks.create", "bookmarks", "create" }, 335 { "bookmarks.create", "bookmarks", "create" },
336 { "bookmarks.create.", "bookmarks", "create." }, 336 { "bookmarks.create.", "bookmarks", "create." },
337 { "bookmarks.create.monkey", "bookmarks", "create.monkey" }, 337 { "bookmarks.create.monkey", "bookmarks", "create.monkey" },
338 { "experimental.bookmarkManager", "experimental.bookmarkManager", "" }, 338 { "bookmarkManagerPrivate", "bookmarkManagerPrivate", "" },
339 { "experimental.bookmarkManager.copy", "experimental.bookmarkManager", 339 { "bookmarkManagerPrivate.copy", "bookmarkManagerPrivate", "copy" }
340 "copy" }
341 }; 340 };
342 341
343 scoped_ptr<ExtensionAPI> api(ExtensionAPI::CreateWithDefaultConfiguration()); 342 scoped_ptr<ExtensionAPI> api(ExtensionAPI::CreateWithDefaultConfiguration());
344 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) { 343 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) {
345 std::string child_name; 344 std::string child_name;
346 std::string api_name = api->GetAPINameFromFullName(test_data[i].input, 345 std::string api_name = api->GetAPINameFromFullName(test_data[i].input,
347 &child_name); 346 &child_name);
348 EXPECT_EQ(test_data[i].api_name, api_name) << test_data[i].input; 347 EXPECT_EQ(test_data[i].api_name, api_name) << test_data[i].input;
349 EXPECT_EQ(test_data[i].child_name, child_name) << test_data[i].input; 348 EXPECT_EQ(test_data[i].child_name, child_name) << test_data[i].input;
350 } 349 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 GetDictionaryFromList(dict, "parameters", 0, &sub_dict); 479 GetDictionaryFromList(dict, "parameters", 0, &sub_dict);
481 EXPECT_TRUE(sub_dict->GetString("$ref", &type)); 480 EXPECT_TRUE(sub_dict->GetString("$ref", &type));
482 EXPECT_EQ("test.foo.TestType", type); 481 EXPECT_EQ("test.foo.TestType", type);
483 GetDictionaryFromList(dict, "parameters", 1, &sub_dict); 482 GetDictionaryFromList(dict, "parameters", 1, &sub_dict);
484 EXPECT_TRUE(sub_dict->GetString("$ref", &type)); 483 EXPECT_TRUE(sub_dict->GetString("$ref", &type));
485 EXPECT_EQ("fully.qualified.Type", type); 484 EXPECT_EQ("fully.qualified.Type", type);
486 } 485 }
487 486
488 } // namespace 487 } // namespace
489 } // namespace extensions 488 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/extension_api.cc ('k') | chrome/common/extensions/docs/server2/test_data/file_system/stat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698