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

Side by Side Diff: chrome/browser/apps/app_browsertest.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 "apps/launcher.h" 5 #include "apps/launcher.h"
6 #include "apps/shell_window.h" 6 #include "apps/shell_window.h"
7 #include "apps/shell_window_registry.h" 7 #include "apps/shell_window_registry.h"
8 #include "apps/ui/native_app_window.h" 8 #include "apps/ui/native_app_window.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 private: 168 private:
169 bool auto_cancel_; 169 bool auto_cancel_;
170 int total_page_count_; 170 int total_page_count_;
171 int rendered_page_count_; 171 int rendered_page_count_;
172 scoped_refptr<content::MessageLoopRunner> waiting_runner_; 172 scoped_refptr<content::MessageLoopRunner> waiting_runner_;
173 gfx::Size dialog_size_; 173 gfx::Size dialog_size_;
174 }; 174 };
175 175
176 #if !defined(OS_CHROMEOS)
176 bool CopyTestDataAndSetCommandLineArg( 177 bool CopyTestDataAndSetCommandLineArg(
Nico 2013/11/10 05:07:09 This function should be in !defined(OS_WIN) since
hans 2013/11/11 19:29:51 Done.
177 const base::FilePath& test_data_file, 178 const base::FilePath& test_data_file,
178 const base::FilePath& temp_dir, 179 const base::FilePath& temp_dir,
179 const char* filename) { 180 const char* filename) {
180 base::FilePath path = temp_dir.AppendASCII( 181 base::FilePath path = temp_dir.AppendASCII(
181 filename).NormalizePathSeparators(); 182 filename).NormalizePathSeparators();
182 if (!(base::CopyFile(test_data_file, path))) 183 if (!(base::CopyFile(test_data_file, path)))
183 return false; 184 return false;
184 185
185 CommandLine* command_line = CommandLine::ForCurrentProcess(); 186 CommandLine* command_line = CommandLine::ForCurrentProcess();
186 command_line->AppendArgPath(path); 187 command_line->AppendArgPath(path);
187 return true; 188 return true;
188 } 189 }
189 190
190 #if !defined(OS_CHROMEOS)
191 const char kTestFilePath[] = "platform_apps/launch_files/test.txt"; 191 const char kTestFilePath[] = "platform_apps/launch_files/test.txt";
192 #endif 192 #endif
193 193
194 } // namespace 194 } // namespace
195 195
196 // Tests that CreateShellWindow doesn't crash if you close it straight away. 196 // Tests that CreateShellWindow doesn't crash if you close it straight away.
197 // LauncherPlatformAppBrowserTest relies on this behaviour, but is only run for 197 // LauncherPlatformAppBrowserTest relies on this behaviour, but is only run for
198 // ash, so we test that it works here. 198 // ash, so we test that it works here.
199 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, CreateAndCloseShellWindow) { 199 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, CreateAndCloseShellWindow) {
200 const Extension* extension = LoadAndLaunchPlatformApp("minimal"); 200 const Extension* extension = LoadAndLaunchPlatformApp("minimal");
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 false); 1298 false);
1299 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); 1299 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied());
1300 1300
1301 EXPECT_EQ(1, request_restart_call_count()); 1301 EXPECT_EQ(1, request_restart_call_count());
1302 } 1302 }
1303 1303
1304 #endif // defined(OS_CHROMEOS) 1304 #endif // defined(OS_CHROMEOS)
1305 1305
1306 1306
1307 } // namespace extensions 1307 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698