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

Side by Side Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_action_unittest.cc

Issue 10825102: Protect Chrome WebStore based on process IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 8 years, 4 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/api/declarative_webrequest/webrequest_action .h" 5 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_action .h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h" 9 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h"
10 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 10 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Check that redirect works on regular URLs but not on protected URLs. 148 // Check that redirect works on regular URLs but not on protected URLs.
149 TestURLRequest regular_request(GURL("http://test.com"), NULL, &context); 149 TestURLRequest regular_request(GURL("http://test.com"), NULL, &context);
150 std::list<LinkedPtrEventResponseDelta> deltas = 150 std::list<LinkedPtrEventResponseDelta> deltas =
151 action_set->CreateDeltas( 151 action_set->CreateDeltas(
152 NULL, "ext1", 152 NULL, "ext1",
153 WebRequestRule::RequestData(&regular_request, ON_BEFORE_REQUEST), 153 WebRequestRule::RequestData(&regular_request, ON_BEFORE_REQUEST),
154 false, base::Time()); 154 false, base::Time());
155 EXPECT_EQ(1u, deltas.size()); 155 EXPECT_EQ(1u, deltas.size());
156 156
157 TestURLRequest protected_request(GURL(extension_urls::kGalleryBrowsePrefix), 157 TestURLRequest protected_request(GURL("http://clients1.google.com"),
158 NULL, &context); 158 NULL, &context);
159 deltas = action_set->CreateDeltas( 159 deltas = action_set->CreateDeltas(
160 NULL, "ext1", 160 NULL, "ext1",
161 WebRequestRule::RequestData(&protected_request, ON_BEFORE_REQUEST), 161 WebRequestRule::RequestData(&protected_request, ON_BEFORE_REQUEST),
162 false, base::Time()); 162 false, base::Time());
163 EXPECT_EQ(0u, deltas.size()); 163 EXPECT_EQ(0u, deltas.size());
164 } 164 }
165 165
166 } // namespace extensions 166 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698