OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |