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

Side by Side Diff: chrome/browser/extensions/api/declarative/declarative_apitest.cc

Issue 566823003: Move declarative_webrequest: action, rules_registry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing another weird re-base error. Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/test/thread_test_helper.h" 11 #include "base/test/thread_test_helper.h"
12 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" 12 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
13 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_ registry.h"
14 #include "chrome/browser/extensions/extension_apitest.h" 13 #include "chrome/browser/extensions/extension_apitest.h"
15 #include "chrome/browser/extensions/test_extension_dir.h" 14 #include "chrome/browser/extensions/test_extension_dir.h"
16 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" 16 #include "chrome/browser/ui/tabs/tab_strip_model.h"
18 #include "chrome/test/base/ui_test_utils.h" 17 #include "chrome/test/base/ui_test_utils.h"
19 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
20 #include "extensions/browser/api/declarative_webrequest/webrequest_constants.h" 19 #include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
20 #include "extensions/browser/api/declarative_webrequest/webrequest_rules_registr y.h"
21 #include "extensions/browser/extension_prefs.h" 21 #include "extensions/browser/extension_prefs.h"
22 #include "extensions/common/extension.h" 22 #include "extensions/common/extension.h"
23 #include "extensions/test/extension_test_message_listener.h" 23 #include "extensions/test/extension_test_message_listener.h"
24 24
25 using content::BrowserThread; 25 using content::BrowserThread;
26 using extensions::Extension; 26 using extensions::Extension;
27 using extensions::ExtensionPrefs; 27 using extensions::ExtensionPrefs;
28 using extensions::RulesRegistry; 28 using extensions::RulesRegistry;
29 using extensions::RulesRegistryService; 29 using extensions::RulesRegistryService;
30 using extensions::TestExtensionDir; 30 using extensions::TestExtensionDir;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(browser()->profile()); 247 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(browser()->profile());
248 EXPECT_TRUE(extension_prefs->HasPrefForExtension(extension_id)); 248 EXPECT_TRUE(extension_prefs->HasPrefForExtension(extension_id));
249 249
250 // 2. Uninstall the extension. Rules are gone and preferences should be empty. 250 // 2. Uninstall the extension. Rules are gone and preferences should be empty.
251 UninstallExtension(extension_id); 251 UninstallExtension(extension_id);
252 ui_test_utils::NavigateToURL(browser(), GURL(kArbitraryUrl)); 252 ui_test_utils::NavigateToURL(browser(), GURL(kArbitraryUrl));
253 EXPECT_NE(kTestTitle, GetTitle()); 253 EXPECT_NE(kTestTitle, GetTitle());
254 EXPECT_EQ(0u, NumberOfRegisteredRules(extension_id)); 254 EXPECT_EQ(0u, NumberOfRegisteredRules(extension_id));
255 EXPECT_FALSE(extension_prefs->HasPrefForExtension(extension_id)); 255 EXPECT_FALSE(extension_prefs->HasPrefForExtension(extension_id));
256 } 256 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698