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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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 "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 10 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/common/extensions/extension.h" 12 #include "chrome/common/extensions/extension.h"
13 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
14 #include "content/public/browser/render_view_host.h" 14 #include "content/public/browser/render_view_host.h"
15 15
16 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertBasic) { 16 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertBasic) {
17 ASSERT_TRUE(RunExtensionTest("alert")) << message_; 17 ASSERT_TRUE(RunExtensionTest("alert")) << message_;
18 18
19 const Extension* extension = GetSingleLoadedExtension(); 19 const extensions::Extension* extension = GetSingleLoadedExtension();
20 ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()-> 20 ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()->
21 GetBackgroundHostForExtension(extension->id()); 21 GetBackgroundHostForExtension(extension->id());
22 ASSERT_TRUE(host); 22 ASSERT_TRUE(host);
23 host->render_view_host()->ExecuteJavascriptInWebFrame(string16(), 23 host->render_view_host()->ExecuteJavascriptInWebFrame(string16(),
24 ASCIIToUTF16("alert('This should not crash.');")); 24 ASCIIToUTF16("alert('This should not crash.');"));
25 25
26 AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); 26 AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
27 ASSERT_TRUE(alert); 27 ASSERT_TRUE(alert);
28 alert->CloseModalDialog(); 28 alert->CloseModalDialog();
29 } 29 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_shelf_context_menu.cc ('k') | chrome/browser/extensions/all_urls_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698