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

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

Issue 7918019: Change the URL for the Extension Settings page from chrome://settings/extensionSettings to chrome... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 service->extension_prefs()->SetIsIncognitoEnabled( 334 service->extension_prefs()->SetIsIncognitoEnabled(
335 service->extensions()->at(size_before)->id(), true); 335 service->extensions()->at(size_before)->id(), true);
336 service->extension_prefs()->SetIsIncognitoEnabled( 336 service->extension_prefs()->SetIsIncognitoEnabled(
337 service->extensions()->at(size_before + 2)->id(), true); 337 service->extensions()->at(size_before + 2)->id(), true);
338 338
339 Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile(); 339 Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile();
340 Browser* incognito_browser = Browser::Create(incognito_profile); 340 Browser* incognito_browser = Browser::Create(incognito_profile);
341 BrowserActionTestUtil incognito_bar(incognito_browser); 341 BrowserActionTestUtil incognito_bar(incognito_browser);
342 342
343 // Navigate just to have a tab in this window, otherwise wonky things happen. 343 // Navigate just to have a tab in this window, otherwise wonky things happen.
344 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), 344 ui_test_utils::OpenURLOffTheRecord(browser()->profile(), GURL("about:blank"));
345 GURL(chrome::kChromeUIExtensionsURL));
346 345
347 ASSERT_EQ(2, incognito_bar.NumberOfBrowserActions()); 346 ASSERT_EQ(2, incognito_bar.NumberOfBrowserActions());
348 347
349 // Ensure that the browser actions are in the right order (ABC). 348 // Ensure that the browser actions are in the right order (ABC).
350 EXPECT_EQ(kTooltipA, GetBrowserActionsBar().GetTooltip(0)); 349 EXPECT_EQ(kTooltipA, GetBrowserActionsBar().GetTooltip(0));
351 EXPECT_EQ(kTooltipB, GetBrowserActionsBar().GetTooltip(1)); 350 EXPECT_EQ(kTooltipB, GetBrowserActionsBar().GetTooltip(1));
352 EXPECT_EQ(kTooltipC, GetBrowserActionsBar().GetTooltip(2)); 351 EXPECT_EQ(kTooltipC, GetBrowserActionsBar().GetTooltip(2));
353 352
354 EXPECT_EQ(kTooltipA, incognito_bar.GetTooltip(0)); 353 EXPECT_EQ(kTooltipA, incognito_bar.GetTooltip(0));
355 EXPECT_EQ(kTooltipC, incognito_bar.GetTooltip(1)); 354 EXPECT_EQ(kTooltipC, incognito_bar.GetTooltip(1));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 browser()->profile(), action->extension_id(), browser()); 397 browser()->profile(), action->extension_id(), browser());
399 398
400 // It can take a moment for the background page to actually get destroyed 399 // It can take a moment for the background page to actually get destroyed
401 // so we wait for the notification before checking that it's really gone 400 // so we wait for the notification before checking that it's really gone
402 // and the badge text has been set. 401 // and the badge text has been set.
403 ui_test_utils::WaitForNotification( 402 ui_test_utils::WaitForNotification(
404 chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED); 403 chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED);
405 ASSERT_FALSE(manager->GetBackgroundHostForExtension(extension)); 404 ASSERT_FALSE(manager->GetBackgroundHostForExtension(extension));
406 ASSERT_EQ("X", action->GetBadgeText(ExtensionAction::kDefaultTabId)); 405 ASSERT_EQ("X", action->GetBadgeText(ExtensionAction::kDefaultTabId));
407 } 406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698