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

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

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_loader.h" 5 #include "chrome/browser/extensions/user_script_loader.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 BrowserThread::FILE, base::MessageLoop::current())); 56 BrowserThread::FILE, base::MessageLoop::current()));
57 ui_thread_.reset(new content::TestBrowserThread( 57 ui_thread_.reset(new content::TestBrowserThread(
58 BrowserThread::UI, base::MessageLoop::current())); 58 BrowserThread::UI, base::MessageLoop::current()));
59 } 59 }
60 60
61 virtual void TearDown() { 61 virtual void TearDown() {
62 file_thread_.reset(); 62 file_thread_.reset();
63 ui_thread_.reset(); 63 ui_thread_.reset();
64 } 64 }
65 65
66 virtual void Observe(int type, 66 void Observe(int type,
67 const content::NotificationSource& source, 67 const content::NotificationSource& source,
68 const content::NotificationDetails& details) override { 68 const content::NotificationDetails& details) override {
69 DCHECK(type == extensions::NOTIFICATION_USER_SCRIPTS_UPDATED); 69 DCHECK(type == extensions::NOTIFICATION_USER_SCRIPTS_UPDATED);
70 70
71 shared_memory_ = content::Details<base::SharedMemory>(details).ptr(); 71 shared_memory_ = content::Details<base::SharedMemory>(details).ptr();
72 if (base::MessageLoop::current() == &message_loop_) 72 if (base::MessageLoop::current() == &message_loop_)
73 base::MessageLoop::current()->Quit(); 73 base::MessageLoop::current()->Quit();
74 } 74 }
75 75
76 // Directory containing user scripts. 76 // Directory containing user scripts.
77 base::ScopedTempDir temp_dir_; 77 base::ScopedTempDir temp_dir_;
78 78
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 UserScriptList user_scripts; 257 UserScriptList user_scripts;
258 user_scripts.push_back(user_script); 258 user_scripts.push_back(user_script);
259 259
260 UserScriptLoader::LoadScriptsForTest(&user_scripts); 260 UserScriptLoader::LoadScriptsForTest(&user_scripts);
261 261
262 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string()); 262 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string());
263 } 263 }
264 264
265 } // namespace extensions 265 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_loader.h ('k') | chrome/browser/extensions/webstore_data_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698