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

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

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/scoped_temp_dir.h" 13 #include "base/scoped_temp_dir.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
18 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
19 #include "content/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 using content::BrowserThread; 22 using content::BrowserThread;
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 }
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 user_scripts.push_back(user_script); 265 user_scripts.push_back(user_script);
266 266
267 UserScriptMaster::ScriptReloader* script_reloader = 267 UserScriptMaster::ScriptReloader* script_reloader =
268 new UserScriptMaster::ScriptReloader(NULL); 268 new UserScriptMaster::ScriptReloader(NULL);
269 script_reloader->AddRef(); 269 script_reloader->AddRef();
270 script_reloader->LoadUserScripts(&user_scripts); 270 script_reloader->LoadUserScripts(&user_scripts);
271 script_reloader->Release(); 271 script_reloader->Release();
272 272
273 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string()); 273 EXPECT_EQ(content, user_scripts[0].js_scripts()[0].GetContent().as_string());
274 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698