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

Side by Side Diff: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad rebase Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/extensions/extension_gcm_app_handler.h" 5 #include "chrome/browser/extensions/extension_gcm_app_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 waiter_.PumpUILoop(); 263 waiter_.PumpUILoop();
264 } 264 }
265 265
266 // Returns a barebones test extension. 266 // Returns a barebones test extension.
267 scoped_refptr<Extension> CreateExtension() { 267 scoped_refptr<Extension> CreateExtension() {
268 base::DictionaryValue manifest; 268 base::DictionaryValue manifest;
269 manifest.SetString(manifest_keys::kVersion, "1.0.0.0"); 269 manifest.SetString(manifest_keys::kVersion, "1.0.0.0");
270 manifest.SetString(manifest_keys::kName, kTestExtensionName); 270 manifest.SetString(manifest_keys::kName, kTestExtensionName);
271 base::ListValue* permission_list = new base::ListValue; 271 base::ListValue* permission_list = new base::ListValue;
272 permission_list->Append(base::Value::CreateStringValue("gcm")); 272 permission_list->Append(new base::StringValue("gcm"));
273 manifest.Set(manifest_keys::kPermissions, permission_list); 273 manifest.Set(manifest_keys::kPermissions, permission_list);
274 274
275 std::string error; 275 std::string error;
276 scoped_refptr<Extension> extension = Extension::Create( 276 scoped_refptr<Extension> extension = Extension::Create(
277 temp_dir_.path(), 277 temp_dir_.path(),
278 Manifest::UNPACKED, 278 Manifest::UNPACKED,
279 manifest, 279 manifest,
280 Extension::NO_FLAGS, 280 Extension::NO_FLAGS,
281 "ldnnhddmnhbkjipkidpdiheffobcpfmf", 281 "ldnnhddmnhbkjipkidpdiheffobcpfmf",
282 &error); 282 &error);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 484
485 // App handler is removed when the extension is updated to the version that 485 // App handler is removed when the extension is updated to the version that
486 // has GCM permission removed. 486 // has GCM permission removed.
487 UpdateExtension(extension, "good2.crx"); 487 UpdateExtension(extension, "good2.crx");
488 waiter()->PumpUILoop(); 488 waiter()->PumpUILoop();
489 EXPECT_TRUE(gcm_app_handler()->app_handler_count_drop_to_zero()); 489 EXPECT_TRUE(gcm_app_handler()->app_handler_count_drop_to_zero());
490 EXPECT_FALSE(HasAppHandlers(extension->id())); 490 EXPECT_FALSE(HasAppHandlers(extension->id()));
491 } 491 }
492 492
493 } // namespace extensions 493 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698