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/extension_unittest.cc

Issue 179028: Revert "Fix a ton of compiler warnings." (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/common/child_process_host.cc ('k') | chrome/common/gtk_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 Extension::GetResourcePath(extension.path(), "../baz.js").value()); 286 Extension::GetResourcePath(extension.path(), "../baz.js").value());
287 } 287 }
288 288
289 TEST(ExtensionTest, LoadPageActionHelper) { 289 TEST(ExtensionTest, LoadPageActionHelper) {
290 Extension extension; 290 Extension extension;
291 std::string error_msg; 291 std::string error_msg;
292 scoped_ptr<PageAction> page_action; 292 scoped_ptr<PageAction> page_action;
293 DictionaryValue input; 293 DictionaryValue input;
294 294
295 // First try with an empty dictionary. We should get nothing back. 295 // First try with an empty dictionary. We should get nothing back.
296 ASSERT_TRUE(NULL == extension.LoadPageActionHelper(&input, 0, &error_msg)); 296 ASSERT_EQ(NULL, extension.LoadPageActionHelper(&input, 0, &error_msg));
297 ASSERT_STRNE("", error_msg.c_str()); 297 ASSERT_STRNE("", error_msg.c_str());
298 error_msg = ""; 298 error_msg = "";
299 299
300 // Now setup some values to use in the page action. 300 // Now setup some values to use in the page action.
301 const std::string id("MyPageActionId"); 301 const std::string id("MyPageActionId");
302 const std::string name("MyPageActionName"); 302 const std::string name("MyPageActionName");
303 std::string img1("image1.png"); 303 std::string img1("image1.png");
304 std::string img2("image2.png"); 304 std::string img2("image2.png");
305 305
306 // Add the page_actions dictionary. 306 // Add the page_actions dictionary.
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 scoped_ptr<Extension> new_extension( 610 scoped_ptr<Extension> new_extension(
611 LoadManifest("allow_silent_upgrade", 611 LoadManifest("allow_silent_upgrade",
612 std::string(kTests[i].base_name) + "_new.json")); 612 std::string(kTests[i].base_name) + "_new.json"));
613 613
614 EXPECT_EQ(kTests[i].expect_success, 614 EXPECT_EQ(kTests[i].expect_success,
615 Extension::IsPrivilegeIncrease(old_extension.get(), 615 Extension::IsPrivilegeIncrease(old_extension.get(),
616 new_extension.get())) 616 new_extension.get()))
617 << kTests[i].base_name; 617 << kTests[i].base_name;
618 } 618 }
619 } 619 }
OLDNEW
« no previous file with comments | « chrome/common/child_process_host.cc ('k') | chrome/common/gtk_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698