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

Side by Side Diff: chrome/browser/ui/browser_browsertest.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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 std::string app_name = new_browser->app_name_; 1567 std::string app_name = new_browser->app_name_;
1568 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos) 1568 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos)
1569 << "Name " << app_name << " should contain id "<< extension_app->id(); 1569 << "Name " << app_name << " should contain id "<< extension_app->id();
1570 } 1570 }
1571 #endif // !defined(OS_MACOSX) 1571 #endif // !defined(OS_MACOSX)
1572 1572
1573 // Makes sure the browser doesn't crash when 1573 // Makes sure the browser doesn't crash when
1574 // set_show_state(ui::SHOW_STATE_MAXIMIZED) has been invoked. 1574 // set_show_state(ui::SHOW_STATE_MAXIMIZED) has been invoked.
1575 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) { 1575 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) {
1576 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; 1576 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP };
1577 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { 1577 for (size_t i = 0; i < arraysize(types); ++i) {
1578 Browser::CreateParams params(types[i], browser()->profile(), 1578 Browser::CreateParams params(types[i], browser()->profile(),
1579 browser()->host_desktop_type()); 1579 browser()->host_desktop_type());
1580 params.initial_show_state = ui::SHOW_STATE_MAXIMIZED; 1580 params.initial_show_state = ui::SHOW_STATE_MAXIMIZED;
1581 AddBlankTabAndShow(new Browser(params)); 1581 AddBlankTabAndShow(new Browser(params));
1582 } 1582 }
1583 } 1583 }
1584 1584
1585 // Aura doesn't support minimized window. crbug.com/104571. 1585 // Aura doesn't support minimized window. crbug.com/104571.
1586 #if defined(USE_AURA) 1586 #if defined(USE_AURA)
1587 #define MAYBE_StartMinimized DISABLED_StartMinimized 1587 #define MAYBE_StartMinimized DISABLED_StartMinimized
1588 #else 1588 #else
1589 #define MAYBE_StartMinimized StartMinimized 1589 #define MAYBE_StartMinimized StartMinimized
1590 #endif 1590 #endif
1591 // Makes sure the browser doesn't crash when 1591 // Makes sure the browser doesn't crash when
1592 // set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked. 1592 // set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked.
1593 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_StartMinimized) { 1593 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_StartMinimized) {
1594 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; 1594 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP };
1595 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { 1595 for (size_t i = 0; i < arraysize(types); ++i) {
1596 Browser::CreateParams params(types[i], browser()->profile(), 1596 Browser::CreateParams params(types[i], browser()->profile(),
1597 browser()->host_desktop_type()); 1597 browser()->host_desktop_type());
1598 params.initial_show_state = ui::SHOW_STATE_MINIMIZED; 1598 params.initial_show_state = ui::SHOW_STATE_MINIMIZED;
1599 AddBlankTabAndShow(new Browser(params)); 1599 AddBlankTabAndShow(new Browser(params));
1600 } 1600 }
1601 } 1601 }
1602 1602
1603 // Makes sure the forward button is disabled immediately when navigating 1603 // Makes sure the forward button is disabled immediately when navigating
1604 // forward to a slow-to-commit page. 1604 // forward to a slow-to-commit page.
1605 IN_PROC_BROWSER_TEST_F(BrowserTest, ForwardDisabledOnForward) { 1605 IN_PROC_BROWSER_TEST_F(BrowserTest, ForwardDisabledOnForward) {
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 #endif 2646 #endif
2647 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2647 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2648 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2648 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2649 gfx::Size exp_final_size(initial_wcv_size); 2649 gfx::Size exp_final_size(initial_wcv_size);
2650 exp_final_size.Enlarge(wcv_resize_insets.width(), 2650 exp_final_size.Enlarge(wcv_resize_insets.width(),
2651 wcv_resize_insets.height() + height_inset); 2651 wcv_resize_insets.height() + height_inset);
2652 EXPECT_EQ(exp_final_size, 2652 EXPECT_EQ(exp_final_size,
2653 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2653 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2654 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); 2654 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
2655 } 2655 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698