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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 TabStripModel::ADD_NONE); 1297 TabStripModel::ADD_NONE);
1298 model->SetTabPinned(0, true); 1298 model->SetTabPinned(0, true);
1299 ui_test_utils::NavigateToURL(browser(), url); 1299 ui_test_utils::NavigateToURL(browser(), url);
1300 1300
1301 MockTabStripModelObserver observer; 1301 MockTabStripModelObserver observer;
1302 model->AddObserver(&observer); 1302 model->AddObserver(&observer);
1303 1303
1304 // Uninstall the extension and make sure TabClosing is sent. 1304 // Uninstall the extension and make sure TabClosing is sent.
1305 ExtensionService* service = extensions::ExtensionSystem::Get( 1305 ExtensionService* service = extensions::ExtensionSystem::Get(
1306 browser()->profile())->extension_service(); 1306 browser()->profile())->extension_service();
1307 service->UninstallExtension(GetExtension()->id(), false, NULL); 1307 service->UninstallExtension(
1308 GetExtension()->id(), ExtensionService::kUninstallReasonDefault, NULL);
1308 EXPECT_EQ(1, observer.closing_count()); 1309 EXPECT_EQ(1, observer.closing_count());
1309 1310
1310 model->RemoveObserver(&observer); 1311 model->RemoveObserver(&observer);
1311 1312
1312 // There should only be one tab now. 1313 // There should only be one tab now.
1313 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 1314 ASSERT_EQ(1, browser()->tab_strip_model()->count());
1314 } 1315 }
1315 1316
1316 #if !defined(OS_MACOSX) 1317 #if !defined(OS_MACOSX)
1317 // Open with --app-id=<id>, and see that an app window opens. 1318 // Open with --app-id=<id>, and see that an app window opens.
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2701 #endif 2702 #endif
2702 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2703 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2703 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2704 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2704 gfx::Size exp_final_size(initial_wcv_size); 2705 gfx::Size exp_final_size(initial_wcv_size);
2705 exp_final_size.Enlarge(wcv_resize_insets.width(), 2706 exp_final_size.Enlarge(wcv_resize_insets.width(),
2706 wcv_resize_insets.height() + height_inset); 2707 wcv_resize_insets.height() + height_inset);
2707 EXPECT_EQ(exp_final_size, 2708 EXPECT_EQ(exp_final_size,
2708 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2709 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2709 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); 2710 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
2710 } 2711 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698