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

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

Issue 61323002: Fix broken threading model in CheckDesktopNotificationPermission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more merge conflicts.. Created 7 years, 1 month 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 LoadManifestUnchecked("permissions", 118 LoadManifestUnchecked("permissions",
119 "web_request_all_host_permissions.json", 119 "web_request_all_host_permissions.json",
120 Manifest::INVALID_LOCATION, 120 Manifest::INVALID_LOCATION,
121 Extension::NO_FLAGS, 121 Extension::NO_FLAGS,
122 "ext_id_2", 122 "ext_id_2",
123 &error); 123 &error);
124 ASSERT_TRUE(extension_all_urls_.get()) << error; 124 ASSERT_TRUE(extension_all_urls_.get()) << error;
125 extension_info_map_ = new InfoMap; 125 extension_info_map_ = new InfoMap;
126 ASSERT_TRUE(extension_info_map_.get()); 126 ASSERT_TRUE(extension_info_map_.get());
127 extension_info_map_->AddExtension( 127 extension_info_map_->AddExtension(
128 extension_.get(), base::Time::Now(), false /*incognito_enabled*/); 128 extension_.get(),
129 base::Time::Now(),
130 false /*incognito_enabled*/,
131 false /*notifications_disabled*/);
129 extension_info_map_->AddExtension(extension_all_urls_.get(), 132 extension_info_map_->AddExtension(extension_all_urls_.get(),
130 base::Time::Now(), 133 base::Time::Now(),
131 false /*incognito_enabled*/); 134 false /*incognito_enabled*/,
135 false /*notifications_disabled*/);
132 } 136 }
133 137
134 bool WebRequestActionWithThreadsTest::ActionWorksOnRequest( 138 bool WebRequestActionWithThreadsTest::ActionWorksOnRequest(
135 const char* url_string, 139 const char* url_string,
136 const std::string& extension_id, 140 const std::string& extension_id,
137 const WebRequestActionSet* action_set, 141 const WebRequestActionSet* action_set,
138 RequestStage stage) { 142 RequestStage stage) {
139 net::TestURLRequest regular_request( 143 net::TestURLRequest regular_request(
140 GURL(url_string), net::DEFAULT_PRIORITY, NULL, &context_); 144 GURL(url_string), net::DEFAULT_PRIORITY, NULL, &context_);
141 std::list<LinkedPtrEventResponseDelta> deltas; 145 std::list<LinkedPtrEventResponseDelta> deltas;
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 for (WebRequestActionSet::Actions::const_iterator it = 572 for (WebRequestActionSet::Actions::const_iterator it =
569 action_set->actions().begin(); 573 action_set->actions().begin();
570 it != action_set->actions().end(); 574 it != action_set->actions().end();
571 ++it) { 575 ++it) {
572 EXPECT_EQ(kExpectedNames[index], (*it)->GetName()); 576 EXPECT_EQ(kExpectedNames[index], (*it)->GetName());
573 ++index; 577 ++index;
574 } 578 }
575 } 579 }
576 580
577 } // namespace extensions 581 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698