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

Side by Side Diff: chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc

Issue 23567023: Enable Device Discovery by default on Linux, ChromeOS and Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 base::Unretained(&condition_devices_listed_)))); 135 base::Unretained(&condition_devices_listed_))));
136 136
137 ui_factory_.reset(new FakeLocalDiscoveryUIFactory( 137 ui_factory_.reset(new FakeLocalDiscoveryUIFactory(
138 fake_lister.Pass())); 138 fake_lister.Pass()));
139 139
140 AddLibrary(base::FilePath(FILE_PATH_LITERAL("local_discovery_ui_test.js"))); 140 AddLibrary(base::FilePath(FILE_PATH_LITERAL("local_discovery_ui_test.js")));
141 } 141 }
142 142
143 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 143 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
144 WebUIBrowserTest::SetUpCommandLine(command_line); 144 WebUIBrowserTest::SetUpCommandLine(command_line);
145 command_line->AppendSwitch(switches::kEnableDeviceDiscovery);
146 } 145 }
147 146
148 FakeLocalDiscoveryUIFactory* ui_factory() { return ui_factory_.get(); } 147 FakeLocalDiscoveryUIFactory* ui_factory() { return ui_factory_.get(); }
149 TestMessageLoopCondition& condition_devices_listed() { 148 TestMessageLoopCondition& condition_devices_listed() {
150 return condition_devices_listed_; 149 return condition_devices_listed_;
151 } 150 }
152 151
153 private: 152 private:
154 scoped_ptr<FakeLocalDiscoveryUIFactory> ui_factory_; 153 scoped_ptr<FakeLocalDiscoveryUIFactory> ui_factory_;
155 TestMessageLoopCondition condition_devices_listed_; 154 TestMessageLoopCondition condition_devices_listed_;
(...skipping 24 matching lines...) Expand all
180 179
181 ui_factory()->privet_lister()->delegate()->DeviceRemoved( 180 ui_factory()->privet_lister()->delegate()->DeviceRemoved(
182 kSampleServiceName); 181 kSampleServiceName);
183 182
184 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkNoDevices")); 183 EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkNoDevices"));
185 } 184 }
186 185
187 } // namespace 186 } // namespace
188 187
189 } // namespace local_discovery 188 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/browser/ui/webui/uber/uber_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698