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

Unified Diff: chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc

Issue 1158693006: Create a mechanism define declarative rules via the extension manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add thread safety to extensionregistry notifications Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc b/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
index 15d3005343dac280668f4c66e7ff2ea16236d904..0a1a73cdb3b1e5109e97c570deff228a8a72cc08 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
+++ b/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
@@ -10,6 +10,9 @@
#include "content/public/test/test_browser_thread.h"
#include "extensions/browser/api/declarative/test_rules_registry.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
+#include "extensions/common/extension.h"
+#include "extensions/common/extension_builder.h"
+#include "extensions/common/value_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -96,8 +99,16 @@ TEST_F(RulesRegistryServiceTest, TestConstructionAndMultiThreading) {
message_loop_.RunUntilIdle();
// Test extension uninstalling.
-
- registry_service.SimulateExtensionUninstalled(kExtensionId);
+ scoped_ptr<base::DictionaryValue> manifest = DictionaryBuilder()
+ .Set("name", "Extension")
+ .Set("version", "1.0")
+ .Set("manifest_version", 2)
+ .Build();
+ scoped_refptr<Extension> extension = ExtensionBuilder()
+ .SetManifest(manifest.Pass())
+ .SetID(kExtensionId)
+ .Build();
+ registry_service.SimulateExtensionUninstalled(extension.get());
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698