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

Side by Side Diff: chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ~WebstoreProviderTest() override {} 101 ~WebstoreProviderTest() override {}
102 102
103 // InProcessBrowserTest overrides: 103 // InProcessBrowserTest overrides:
104 void SetUpOnMainThread() override { 104 void SetUpOnMainThread() override {
105 test_server_.reset(new EmbeddedTestServer); 105 test_server_.reset(new EmbeddedTestServer);
106 106
107 ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady()); 107 ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady());
108 test_server_->RegisterRequestHandler( 108 test_server_->RegisterRequestHandler(
109 base::Bind(&WebstoreProviderTest::HandleRequest, 109 base::Bind(&WebstoreProviderTest::HandleRequest,
110 base::Unretained(this))); 110 base::Unretained(this)));
111 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 111 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
112 ::switches::kAppsGalleryURL, test_server_->base_url().spec()); 112 ::switches::kAppsGalleryURL, test_server_->base_url().spec());
113 CommandLine::ForCurrentProcess()->AppendSwitch( 113 base::CommandLine::ForCurrentProcess()->AppendSwitch(
114 switches::kEnableExperimentalAppList); 114 switches::kEnableExperimentalAppList);
115 115
116 webstore_provider_.reset(new WebstoreProvider( 116 webstore_provider_.reset(new WebstoreProvider(
117 ProfileManager::GetActiveUserProfile(), NULL)); 117 ProfileManager::GetActiveUserProfile(), NULL));
118 webstore_provider_->set_webstore_search_fetched_callback( 118 webstore_provider_->set_webstore_search_fetched_callback(
119 base::Bind(&WebstoreProviderTest::OnSearchResultsFetched, 119 base::Bind(&WebstoreProviderTest::OnSearchResultsFetched,
120 base::Unretained(this))); 120 base::Unretained(this)));
121 // TODO(mukai): add test cases for throttling. 121 // TODO(mukai): add test cases for throttling.
122 webstore_provider_->set_use_throttling(false); 122 webstore_provider_->set_use_throttling(false);
123 } 123 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 #endif 301 #endif
302 IN_PROC_BROWSER_TEST_F(WebstoreProviderTest, MAYBE_SearchCache) { 302 IN_PROC_BROWSER_TEST_F(WebstoreProviderTest, MAYBE_SearchCache) {
303 RunQueryAndVerify("foo", kOneResult, kParsedOneResult, 1); 303 RunQueryAndVerify("foo", kOneResult, kParsedOneResult, 1);
304 304
305 // No result is provided but the provider gets the result from the cache. 305 // No result is provided but the provider gets the result from the cache.
306 RunQueryAndVerify("foo", "", kParsedOneResult, 1); 306 RunQueryAndVerify("foo", "", kParsedOneResult, 1);
307 } 307 }
308 308
309 } // namespace test 309 } // namespace test
310 } // namespace app_list 310 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698