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

Side by Side Diff: chrome/browser/background/background_application_list_model_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 // TODO(rickcam): Bug 73183: Add unit tests for image loading 5 // TODO(rickcam): Bug 73183: Add unit tests for image loading
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <set> 8 #include <set>
9 9
10 #include "chrome/browser/background/background_application_list_model.h" 10 #include "chrome/browser/background/background_application_list_model.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0"); 66 manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0");
67 manifest.SetString(extension_manifest_keys::kName, name); 67 manifest.SetString(extension_manifest_keys::kName, name);
68 if (background_permission) { 68 if (background_permission) {
69 ListValue* permissions = new ListValue(); 69 ListValue* permissions = new ListValue();
70 manifest.Set(extension_manifest_keys::kPermissions, permissions); 70 manifest.Set(extension_manifest_keys::kPermissions, permissions);
71 permissions->Append(Value::CreateStringValue("background")); 71 permissions->Append(Value::CreateStringValue("background"));
72 } 72 }
73 std::string error; 73 std::string error;
74 scoped_refptr<Extension> extension = Extension::Create( 74 scoped_refptr<Extension> extension = Extension::Create(
75 bogus_file_path().AppendASCII(name), 75 bogus_file_path().AppendASCII(name),
76 Extension::INVALID, 76 extensions::Manifest::INVALID_LOCATION,
77 manifest, 77 manifest,
78 Extension::NO_FLAGS, 78 Extension::NO_FLAGS,
79 &error); 79 &error);
80 // Cannot ASSERT_* here because that attempts an illegitimate return. 80 // Cannot ASSERT_* here because that attempts an illegitimate return.
81 // Cannot EXPECT_NE here because that assumes non-pointers unlike EXPECT_EQ 81 // Cannot EXPECT_NE here because that assumes non-pointers unlike EXPECT_EQ
82 EXPECT_TRUE(extension.get() != NULL) << error; 82 EXPECT_TRUE(extension.get() != NULL) << error;
83 return extension; 83 return extension;
84 } 84 }
85 85
86 namespace { 86 namespace {
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 break; 371 break;
372 case 2: 372 case 2:
373 TogglePermission(service, &extensions, model.get(), &expected, &count); 373 TogglePermission(service, &extensions, model.get(), &expected, &count);
374 break; 374 break;
375 default: 375 default:
376 NOTREACHED(); 376 NOTREACHED();
377 break; 377 break;
378 } 378 }
379 } 379 }
380 } 380 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698