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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller_browsertest.cc

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 protected: 201 protected:
202 typedef WebIntentPickerModel::Disposition Disposition; 202 typedef WebIntentPickerModel::Disposition Disposition;
203 203
204 WebIntentPickerControllerBrowserTest() {} 204 WebIntentPickerControllerBrowserTest() {}
205 205
206 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 206 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
207 // We start the test server now instead of in 207 // We start the test server now instead of in
208 // SetUpInProcessBrowserTestFixture so that we can get its port number. 208 // SetUpInProcessBrowserTestFixture so that we can get its port number.
209 ASSERT_TRUE(test_server()->Start()); 209 ASSERT_TRUE(test_server()->Start());
210 210
211 InProcessBrowserTest::SetUpCommandLine(command_line);
212
213 net::HostPortPair host_port = test_server()->host_port_pair(); 211 net::HostPortPair host_port = test_server()->host_port_pair();
214 command_line->AppendSwitchASCII( 212 command_line->AppendSwitchASCII(
215 switches::kAppsGalleryDownloadURL, 213 switches::kAppsGalleryDownloadURL,
216 base::StringPrintf( 214 base::StringPrintf(
217 "http://www.example.com:%d/files/extensions/intents/%%s.crx", 215 "http://www.example.com:%d/files/extensions/intents/%%s.crx",
218 host_port.port())); 216 host_port.port()));
219 command_line->AppendSwitchASCII( 217 command_line->AppendSwitchASCII(
220 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); 218 switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
221 } 219 }
222 220
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 623
626 EXPECT_EQ(2, picker_.num_installed_services_); 624 EXPECT_EQ(2, picker_.num_installed_services_);
627 625
628 // The tab is shown immediately without needing to call OnServiceChosen. 626 // The tab is shown immediately without needing to call OnServiceChosen.
629 ASSERT_EQ(2, browser()->tab_count()); 627 ASSERT_EQ(2, browser()->tab_count());
630 EXPECT_EQ(GURL(kServiceURL1), 628 EXPECT_EQ(GURL(kServiceURL1),
631 chrome::GetActiveWebContents(browser())->GetURL()); 629 chrome::GetActiveWebContents(browser())->GetURL());
632 630
633 EXPECT_TRUE(dispatcher.dispatched_); 631 EXPECT_TRUE(dispatcher.dispatched_);
634 } 632 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen/fullscreen_controller_test.cc ('k') | chrome/browser/ui/panels/base_panel_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698