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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_log_browsertest.cc

Issue 19690003: Extension activity log database refactoring (step 3) (Closed) Base URL: http://git.chromium.org/chromium/src.git@refactor2
Patch Set: Do not set bad BlockedChromeActivityDetail::Reason values Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "chrome/browser/extensions/activity_log/activity_log.h" 6 #include "chrome/browser/extensions/activity_log/activity_log.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/prerender/prerender_handle.h" 9 #include "chrome/browser/prerender/prerender_handle.h"
10 #include "chrome/browser/prerender/prerender_manager.h" 10 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 28 matching lines...) Expand all
39 int port, 39 int port,
40 scoped_ptr<std::vector<scoped_refptr<Action> > > i) { 40 scoped_ptr<std::vector<scoped_refptr<Action> > > i) {
41 // This is to exit RunLoop (base::MessageLoop::current()->Run()) below 41 // This is to exit RunLoop (base::MessageLoop::current()->Run()) below
42 base::MessageLoop::current()->PostTask( 42 base::MessageLoop::current()->PostTask(
43 FROM_HERE, base::MessageLoop::QuitClosure()); 43 FROM_HERE, base::MessageLoop::QuitClosure());
44 44
45 ASSERT_TRUE(i->size()); 45 ASSERT_TRUE(i->size());
46 scoped_refptr<Action> last = i->front(); 46 scoped_refptr<Action> last = i->front();
47 47
48 std::string args = base::StringPrintf( 48 std::string args = base::StringPrintf(
49 "ID=%s CATEGORY=content_script API= ARGS=[\"\\\"/google_cs.js \\\"\"] " 49 "ID=%s CATEGORY=content_script API= ARGS=[\"/google_cs.js \"] "
50 "PAGE_URL=http://www.google.com.bo:%d/test.html " 50 "PAGE_URL=http://www.google.com.bo:%d/test.html "
51 "OTHER={\"dom_verb\":3,\"extra\":\"(prerender)\",\"page_title\":\"www." 51 "PAGE_TITLE=\"www.google.com.bo:%d/test.html\" "
52 "google.com.bo:%d/test.html\"}", 52 "OTHER={\"dom_verb\":3,\"extra\":\"(prerender)\"}",
53 extension_id.c_str(), port, port); 53 extension_id.c_str(), port, port);
54 // TODO: Replace PrintForDebug with field testing 54 // TODO: Replace PrintForDebug with field testing
55 // when this feature will be available 55 // when this feature will be available
56 ASSERT_EQ(args, last->PrintForDebug()); 56 ASSERT_EQ(args, last->PrintForDebug());
57 } 57 }
58 }; 58 };
59 59
60 IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, TestScriptInjected) { 60 IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, TestScriptInjected) {
61 host_resolver()->AddRule("*", "127.0.0.1"); 61 host_resolver()->AddRule("*", "127.0.0.1");
62 StartEmbeddedTestServer(); 62 StartEmbeddedTestServer();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 activity_log->GetActions( 103 activity_log->GetActions(
104 ext->id(), 0, base::Bind( 104 ext->id(), 0, base::Bind(
105 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); 105 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port));
106 106
107 // Allow invocation of Prerender_Arguments 107 // Allow invocation of Prerender_Arguments
108 base::MessageLoop::current()->Run(); 108 base::MessageLoop::current()->Run();
109 } 109 }
110 110
111 } // namespace extensions 111 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/activity_log/activity_log.cc ('k') | chrome/browser/extensions/activity_log/activity_log_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698