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

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

Issue 5742008: Clean up threading model of external extension providers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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) 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/ref_counted.h" 5 #include "base/ref_counted.h"
6 #include "chrome/browser/extensions/autoupdate_interceptor.h" 6 #include "chrome/browser/extensions/autoupdate_interceptor.h"
7 #include "chrome/browser/extensions/extension_browsertest.h" 7 #include "chrome/browser/extensions/extension_browsertest.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 // Check if the extension got installed. 359 // Check if the extension got installed.
360 ASSERT_TRUE(WaitForExtensionInstall()); 360 ASSERT_TRUE(WaitForExtensionInstall());
361 const ExtensionList* extensions = service->extensions(); 361 const ExtensionList* extensions = service->extensions();
362 ASSERT_EQ(size_before + 1, extensions->size()); 362 ASSERT_EQ(size_before + 1, extensions->size());
363 ASSERT_EQ(kExtensionId, extensions->at(size_before)->id()); 363 ASSERT_EQ(kExtensionId, extensions->at(size_before)->id());
364 EXPECT_EQ("2.0", extensions->at(size_before)->VersionString()); 364 EXPECT_EQ("2.0", extensions->at(size_before)->VersionString());
365 EXPECT_EQ(Extension::EXTERNAL_POLICY_DOWNLOAD, 365 EXPECT_EQ(Extension::EXTERNAL_POLICY_DOWNLOAD,
366 extensions->at(size_before)->location()); 366 extensions->at(size_before)->location());
367 367
368 // Check that emptying the list doesn't cause any trouble. 368 // Check that emptying the list triggers uninstall.
369 prefs->ClearPref(prefs::kExtensionInstallForceList); 369 {
370 ScopedPrefUpdate pref_update(prefs, prefs::kExtensionInstallForceList);
371 prefs->ClearPref(prefs::kExtensionInstallForceList);
372 }
373 EXPECT_EQ(size_before, extensions->size());
374 ExtensionList::const_iterator i;
375 for (i = extensions->begin(); i != extensions->end(); ++i) {
jochen (gone - plz use gerrit) 2011/01/04 12:38:01 no { }
gfeher 2011/01/04 23:37:09 Done.
376 EXPECT_FALSE("ogjcoiohnmldgjemafoockdghcjciccf" == (*i)->id());
jochen (gone - plz use gerrit) 2011/01/04 12:38:01 EXPECT_NE
Sam Kerner (Chrome) 2011/01/04 14:06:00 Use kExtensionId instead of the string constant.
gfeher 2011/01/04 23:37:09 Done.
gfeher 2011/01/04 23:37:09 Done.
377 }
370 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698