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

Side by Side Diff: chrome/common/extensions/extension_set_unittest.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 15 matching lines...) Expand all
26 DictionaryValue manifest; 26 DictionaryValue manifest;
27 manifest.SetString("name", name); 27 manifest.SetString("name", name);
28 manifest.SetString("version", "1"); 28 manifest.SetString("version", "1");
29 29
30 if (!launch_url.empty()) 30 if (!launch_url.empty())
31 manifest.SetString("app.launch.web_url", launch_url); 31 manifest.SetString("app.launch.web_url", launch_url);
32 32
33 if (!extent.empty()) { 33 if (!extent.empty()) {
34 ListValue* urls = new ListValue(); 34 ListValue* urls = new ListValue();
35 manifest.Set("app.urls", urls); 35 manifest.Set("app.urls", urls);
36 urls->Append(Value::CreateStringValue(extent)); 36 urls->Append(base::StringValue::New(extent));
37 } 37 }
38 38
39 std::string error; 39 std::string error;
40 scoped_refptr<Extension> extension( 40 scoped_refptr<Extension> extension(
41 Extension::Create(path, Extension::INTERNAL, manifest, 41 Extension::Create(path, Extension::INTERNAL, manifest,
42 Extension::STRICT_ERROR_CHECKS, &error)); 42 Extension::STRICT_ERROR_CHECKS, &error));
43 EXPECT_TRUE(extension.get()) << error; 43 EXPECT_TRUE(extension.get()) << error;
44 return extension; 44 return extension;
45 } 45 }
46 46
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Both of these should be NULL, which mean true for InSameExtent. 108 // Both of these should be NULL, which mean true for InSameExtent.
109 EXPECT_TRUE(extensions.InSameExtent( 109 EXPECT_TRUE(extensions.InSameExtent(
110 GURL("http://www.google.com/"), 110 GURL("http://www.google.com/"),
111 GURL("http://blog.chromium.org/"))); 111 GURL("http://blog.chromium.org/")));
112 112
113 // Remove one of the extensions. 113 // Remove one of the extensions.
114 extensions.Remove(ext2->id()); 114 extensions.Remove(ext2->id());
115 EXPECT_EQ(2u, extensions.size()); 115 EXPECT_EQ(2u, extensions.size());
116 EXPECT_FALSE(extensions.GetByID(ext2->id())); 116 EXPECT_FALSE(extensions.GetByID(ext2->id()));
117 } 117 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_manifests_unittest.cc ('k') | chrome/common/json_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698