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

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

Issue 10696176: Move UserScript and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 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
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 "chrome/browser/extensions/user_script_master.h" 5 #include "chrome/browser/extensions/user_script_master.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 12 matching lines...) Expand all
23 23
24 namespace { 24 namespace {
25 25
26 static void AddPattern(URLPatternSet* extent, const std::string& pattern) { 26 static void AddPattern(URLPatternSet* extent, const std::string& pattern) {
27 int schemes = URLPattern::SCHEME_ALL; 27 int schemes = URLPattern::SCHEME_ALL;
28 extent->AddPattern(URLPattern(schemes, pattern)); 28 extent->AddPattern(URLPattern(schemes, pattern));
29 } 29 }
30 30
31 } 31 }
32 32
33 namespace extensions {
34
33 // Test bringing up a master on a specific directory, putting a script 35 // Test bringing up a master on a specific directory, putting a script
34 // in there, etc. 36 // in there, etc.
35 37
36 class UserScriptMasterTest : public testing::Test, 38 class UserScriptMasterTest : public testing::Test,
37 public content::NotificationObserver { 39 public content::NotificationObserver {
38 public: 40 public:
39 UserScriptMasterTest() 41 UserScriptMasterTest()
40 : message_loop_(MessageLoop::TYPE_UI), 42 : message_loop_(MessageLoop::TYPE_UI),
41 shared_memory_(NULL) { 43 shared_memory_(NULL) {
42 } 44 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 user_scripts.push_back(user_script); 267 user_scripts.push_back(user_script);
266 268
267 UserScriptMaster::ScriptReloader* script_reloader = 269 UserScriptMaster::ScriptReloader* script_reloader =
268 new UserScriptMaster::ScriptReloader(NULL); 270 new UserScriptMaster::ScriptReloader(NULL);
269 script_reloader->AddRef(); 271 script_reloader->AddRef();
270 script_reloader->LoadUserScripts(&user_scripts); 272 script_reloader->LoadUserScripts(&user_scripts);
271 script_reloader->Release(); 273 script_reloader->Release();
272 274
273 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string()); 275 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string());
274 } 276 }
277
278 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_master.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698