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

Side by Side Diff: chrome/browser/prerender/prerender_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 (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 <map> 5 #include <map>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 { 2, 1 }, 610 { 2, 1 },
611 611
612 // With the per launcher limit higher than system limit, the system limit 612 // With the per launcher limit higher than system limit, the system limit
613 // should be in effect. 613 // should be in effect.
614 { 2, 4 }, 614 { 2, 4 },
615 }; 615 };
616 616
617 DummyPrerenderContents* null = NULL; 617 DummyPrerenderContents* null = NULL;
618 GURL url_to_delay("http://www.google.com/delayme"); 618 GURL url_to_delay("http://www.google.com/delayme");
619 619
620 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(concurrencies_to_test); ++i) { 620 for (size_t i = 0; i < arraysize(concurrencies_to_test); ++i) {
621 prerender_manager()->mutable_config().max_link_concurrency = 621 prerender_manager()->mutable_config().max_link_concurrency =
622 concurrencies_to_test[i].max_link_concurrency; 622 concurrencies_to_test[i].max_link_concurrency;
623 prerender_manager()->mutable_config().max_link_concurrency_per_launcher = 623 prerender_manager()->mutable_config().max_link_concurrency_per_launcher =
624 concurrencies_to_test[i].max_link_concurrency_per_launcher; 624 concurrencies_to_test[i].max_link_concurrency_per_launcher;
625 625
626 const size_t effective_max_link_concurrency = 626 const size_t effective_max_link_concurrency =
627 std::min(concurrencies_to_test[i].max_link_concurrency, 627 std::min(concurrencies_to_test[i].max_link_concurrency,
628 concurrencies_to_test[i].max_link_concurrency_per_launcher); 628 concurrencies_to_test[i].max_link_concurrency_per_launcher);
629 629
630 std::vector<GURL> urls; 630 std::vector<GURL> urls;
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 CHECK(prerender_handle.get()); 1582 CHECK(prerender_handle.get());
1583 EXPECT_TRUE(prerender_handle->IsPrerendering()); 1583 EXPECT_TRUE(prerender_handle->IsPrerendering());
1584 EXPECT_TRUE(prerender_contents->prerendering_has_started()); 1584 EXPECT_TRUE(prerender_contents->prerendering_has_started());
1585 EXPECT_EQ(prerender_contents, prerender_handle->contents()); 1585 EXPECT_EQ(prerender_contents, prerender_handle->contents());
1586 EXPECT_EQ(ORIGIN_INSTANT, prerender_handle->contents()->origin()); 1586 EXPECT_EQ(ORIGIN_INSTANT, prerender_handle->contents()->origin());
1587 ASSERT_EQ(prerender_contents, prerender_manager()->FindAndUseEntry(url)); 1587 ASSERT_EQ(prerender_contents, prerender_manager()->FindAndUseEntry(url));
1588 EXPECT_FALSE(prerender_handle->IsPrerendering()); 1588 EXPECT_FALSE(prerender_handle->IsPrerendering());
1589 } 1589 }
1590 1590
1591 } // namespace prerender 1591 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/profile_resetter/jtl_interpreter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698