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

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

Issue 12518036: net: move host_resolver files from net/base to net/dns (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_install_ui.h" 9 #include "chrome/browser/extensions/extension_install_ui.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/extensions/extension_system.h" 11 #include "chrome/browser/extensions/extension_system.h"
12 #include "chrome/browser/extensions/startup_helper.h" 12 #include "chrome/browser/extensions/startup_helper.h"
13 #include "chrome/browser/extensions/webstore_standalone_installer.h" 13 #include "chrome/browser/extensions/webstore_standalone_installer.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" 16 #include "chrome/browser/ui/tabs/tab_strip_model.h"
17 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/extensions/extension_builder.h" 19 #include "chrome/common/extensions/extension_builder.h"
20 #include "chrome/common/extensions/value_builder.h" 20 #include "chrome/common/extensions/value_builder.h"
21 #include "chrome/test/base/in_process_browser_test.h" 21 #include "chrome/test/base/in_process_browser_test.h"
22 #include "chrome/test/base/ui_test_utils.h" 22 #include "chrome/test/base/ui_test_utils.h"
23 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "content/public/browser/notification_types.h" 25 #include "content/public/browser/notification_types.h"
26 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
27 #include "content/public/test/browser_test_utils.h" 27 #include "content/public/test/browser_test_utils.h"
28 #include "googleurl/src/gurl.h" 28 #include "googleurl/src/gurl.h"
29 #include "net/base/host_port_pair.h" 29 #include "net/base/host_port_pair.h"
30 #include "net/base/mock_host_resolver.h" 30 #include "net/dns/mock_host_resolver.h"
31 31
32 using content::WebContents; 32 using content::WebContents;
33 using extensions::DictionaryBuilder; 33 using extensions::DictionaryBuilder;
34 using extensions::Extension; 34 using extensions::Extension;
35 using extensions::ExtensionBuilder; 35 using extensions::ExtensionBuilder;
36 using extensions::ListBuilder; 36 using extensions::ListBuilder;
37 37
38 const char kWebstoreDomain[] = "cws.com"; 38 const char kWebstoreDomain[] = "cws.com";
39 const char kAppDomain[] = "app.com"; 39 const char kAppDomain[] = "app.com";
40 const char kNonAppDomain[] = "nonapp.com"; 40 const char kNonAppDomain[] = "nonapp.com";
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 switches::kLimitedInstallFromWebstore, "2"); 369 switches::kLimitedInstallFromWebstore, "2");
370 command_line->AppendSwitchASCII( 370 command_line->AppendSwitchASCII(
371 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); 371 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
372 extensions::StartupHelper helper; 372 extensions::StartupHelper helper;
373 helper.LimitedInstallFromWebstore(*command_line, browser()->profile(), 373 helper.LimitedInstallFromWebstore(*command_line, browser()->profile(),
374 MessageLoop::QuitWhenIdleClosure()); 374 MessageLoop::QuitWhenIdleClosure());
375 MessageLoop::current()->Run(); 375 MessageLoop::current()->Run();
376 EXPECT_FALSE(saw_install()); 376 EXPECT_FALSE(saw_install());
377 EXPECT_EQ(0, browser_open_count()); 377 EXPECT_EQ(0, browser_open_count());
378 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698