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

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

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Expected results. 165 // Expected results.
166 bool should_allow_main_frame_load; 166 bool should_allow_main_frame_load;
167 bool should_allow_sub_frame_load; 167 bool should_allow_sub_frame_load;
168 } cases[] = { 168 } cases[] = {
169 {"spanning disabled", false, false, false, false}, 169 {"spanning disabled", false, false, false, false},
170 {"split disabled", true, false, false, false}, 170 {"split disabled", true, false, false, false},
171 {"spanning enabled", false, true, false, true}, 171 {"spanning enabled", false, true, false, true},
172 {"split enabled", true, true, true, true}, 172 {"split enabled", true, true, true, true},
173 }; 173 };
174 174
175 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 175 for (size_t i = 0; i < arraysize(cases); ++i) {
176 scoped_refptr<Extension> extension = 176 scoped_refptr<Extension> extension =
177 CreateTestExtension(cases[i].name, cases[i].incognito_split_mode); 177 CreateTestExtension(cases[i].name, cases[i].incognito_split_mode);
178 extension_info_map_->AddExtension( 178 extension_info_map_->AddExtension(
179 extension.get(), base::Time::Now(), cases[i].incognito_enabled, false); 179 extension.get(), base::Time::Now(), cases[i].incognito_enabled, false);
180 180
181 // First test a main frame request. 181 // First test a main frame request.
182 { 182 {
183 // It doesn't matter that the resource doesn't exist. If the resource 183 // It doesn't matter that the resource doesn't exist. If the resource
184 // is blocked, we should see ADDRESS_UNREACHABLE. Otherwise, the request 184 // is blocked, we should see ADDRESS_UNREACHABLE. Otherwise, the request
185 // should just fail because the file doesn't exist. 185 // should just fail because the file doesn't exist.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 extension->GetResourceURL("test.dat"), 355 extension->GetResourceURL("test.dat"),
356 net::DEFAULT_PRIORITY, 356 net::DEFAULT_PRIORITY,
357 &test_delegate_, 357 &test_delegate_,
358 NULL)); 358 NULL));
359 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); 359 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA);
360 EXPECT_EQ(net::URLRequestStatus::FAILED, request->status().status()); 360 EXPECT_EQ(net::URLRequestStatus::FAILED, request->status().status());
361 } 361 }
362 } 362 }
363 363
364 } // namespace extensions 364 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/socket/udp_socket_unittest.cc ('k') | chrome/browser/global_keyboard_shortcuts_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698