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

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

Issue 12212047: Linux/ChromeOS Chromium style checker cleanup, chrome/browser/extensions edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 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 "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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 BrowserThread::UI, MessageLoop::current())); 59 BrowserThread::UI, MessageLoop::current()));
60 } 60 }
61 61
62 virtual void TearDown() { 62 virtual void TearDown() {
63 file_thread_.reset(); 63 file_thread_.reset();
64 ui_thread_.reset(); 64 ui_thread_.reset();
65 } 65 }
66 66
67 virtual void Observe(int type, 67 virtual void Observe(int type,
68 const content::NotificationSource& source, 68 const content::NotificationSource& source,
69 const content::NotificationDetails& details) { 69 const content::NotificationDetails& details) OVERRIDE {
70 DCHECK(type == chrome::NOTIFICATION_USER_SCRIPTS_UPDATED); 70 DCHECK(type == chrome::NOTIFICATION_USER_SCRIPTS_UPDATED);
71 71
72 shared_memory_ = content::Details<base::SharedMemory>(details).ptr(); 72 shared_memory_ = content::Details<base::SharedMemory>(details).ptr();
73 if (MessageLoop::current() == &message_loop_) 73 if (MessageLoop::current() == &message_loop_)
74 MessageLoop::current()->Quit(); 74 MessageLoop::current()->Quit();
75 } 75 }
76 76
77 // Directory containing user scripts. 77 // Directory containing user scripts.
78 base::ScopedTempDir temp_dir_; 78 base::ScopedTempDir temp_dir_;
79 79
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 UserScriptMaster::ScriptReloader* script_reloader = 270 UserScriptMaster::ScriptReloader* script_reloader =
271 new UserScriptMaster::ScriptReloader(NULL); 271 new UserScriptMaster::ScriptReloader(NULL);
272 script_reloader->AddRef(); 272 script_reloader->AddRef();
273 script_reloader->LoadUserScripts(&user_scripts); 273 script_reloader->LoadUserScripts(&user_scripts);
274 script_reloader->Release(); 274 script_reloader->Release();
275 275
276 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string()); 276 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string());
277 } 277 }
278 278
279 } // namespace extensions 279 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_listener_unittest.cc ('k') | chrome/browser/extensions/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698