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

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

Issue 5089001: Cleanup: Include browser.h -> ui/browser.h [Part 3]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes. Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/app_modal_dialog.h" 5 #include "chrome/browser/app_modal_dialog.h"
6 #include "chrome/browser/browser.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
11 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/test/ui_test_utils.h" 12 #include "chrome/test/ui_test_utils.h"
13 13
14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertBasic) { 14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertBasic) {
15 ASSERT_TRUE(RunExtensionTest("alert")) << message_; 15 ASSERT_TRUE(RunExtensionTest("alert")) << message_;
16 16
17 const Extension* extension = GetSingleLoadedExtension(); 17 const Extension* extension = GetSingleLoadedExtension();
18 ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()-> 18 ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()->
19 GetBackgroundHostForExtension(extension); 19 GetBackgroundHostForExtension(extension);
20 ASSERT_TRUE(host); 20 ASSERT_TRUE(host);
21 host->render_view_host()->ExecuteJavascriptInWebFrame(L"", 21 host->render_view_host()->ExecuteJavascriptInWebFrame(L"",
22 L"alert('This should not crash.');"); 22 L"alert('This should not crash.');");
23 23
24 AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); 24 AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
25 ASSERT_TRUE(alert); 25 ASSERT_TRUE(alert);
26 alert->CloseModalDialog(); 26 alert->CloseModalDialog();
27 } 27 }
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | chrome/browser/extensions/all_urls_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698