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

Side by Side Diff: chrome/browser/accessibility/accessibility_extension_apitest.cc

Issue 10843071: Create chrome/browser/api directory. Move infobar delegates used by Autofill to the directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 4 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 "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/api/infobars/simple_alert_infobar_delegate.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/infobars/infobar_tab_helper.h" 8 #include "chrome/browser/infobars/infobar_tab_helper.h"
8 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
11 #include "chrome/browser/ui/tab_contents/tab_contents.h" 11 #include "chrome/browser/ui/tab_contents/tab_contents.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 13
14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetAlertsForTab) { 14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, GetAlertsForTab) {
15 TabContents* tab = chrome::GetActiveTabContents(browser()); 15 TabContents* tab = chrome::GetActiveTabContents(browser());
16 ASSERT_TRUE(tab); 16 ASSERT_TRUE(tab);
17 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); 17 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
18 18
19 const char kAlertMessage[] = "Simple Alert Infobar."; 19 const char kAlertMessage[] = "Simple Alert Infobar.";
20 infobar_helper->AddInfoBar( 20 infobar_helper->AddInfoBar(
21 new SimpleAlertInfoBarDelegate(infobar_helper, 21 new SimpleAlertInfoBarDelegate(infobar_helper,
22 NULL, 22 NULL,
23 ASCIIToUTF16(kAlertMessage), 23 ASCIIToUTF16(kAlertMessage),
24 false)); 24 false));
25 CommandLine::ForCurrentProcess()->AppendSwitch( 25 CommandLine::ForCurrentProcess()->AppendSwitch(
26 switches::kEnableExperimentalExtensionApis); 26 switches::kEnableExperimentalExtensionApis);
27 ASSERT_TRUE(RunExtensionTest("accessibility/get_alerts_for_tab")) << message_; 27 ASSERT_TRUE(RunExtensionTest("accessibility/get_alerts_for_tab")) << message_;
28 } 28 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_extension_api.cc ('k') | chrome/browser/alternate_nav_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698