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

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: Fix unit tests 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 ASSERT_TRUE(action.get()); 146 ASSERT_TRUE(action.get());
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(NULL, "ext1", &regular_request, false, 151 action_set->CreateDeltas(NULL, "ext1", &regular_request, false,
152 ON_BEFORE_REQUEST, WebRequestRule::OptionalRequestData(), 152 ON_BEFORE_REQUEST, WebRequestRule::OptionalRequestData(),
153 base::Time()); 153 base::Time());
154 EXPECT_EQ(1u, deltas.size()); 154 EXPECT_EQ(1u, deltas.size());
155 155
156 TestURLRequest protected_request(GURL(extension_urls::kGalleryBrowsePrefix), 156 TestURLRequest protected_request(GURL("http://client.google.com"),
157 NULL, &context); 157 NULL, &context);
158 deltas = action_set->CreateDeltas(NULL, "ext1", &protected_request, false, 158 deltas = action_set->CreateDeltas(NULL, "ext1", &protected_request, false,
159 ON_BEFORE_REQUEST, WebRequestRule::OptionalRequestData(), 159 ON_BEFORE_REQUEST, WebRequestRule::OptionalRequestData(),
160 base::Time()); 160 base::Time());
161 EXPECT_EQ(0u, deltas.size()); 161 EXPECT_EQ(0u, deltas.size());
162 } 162 }
163 163
164 } // namespace extensions 164 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698