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

Side by Side Diff: chrome/test/reliability/automated_ui_tests.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 <fstream> 5 #include <fstream>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 int start_depth = init_reader_.Depth(); 293 int start_depth = init_reader_.Depth();
294 ASSERT_TRUE(init_reader_.Read()) << "Malformed XML file."; 294 ASSERT_TRUE(init_reader_.Read()) << "Malformed XML file.";
295 init_reader_.SkipToElement(); 295 init_reader_.SkipToElement();
296 296
297 // Check for a crash right after startup. 297 // Check for a crash right after startup.
298 if (DidCrash(true)) { 298 if (DidCrash(true)) {
299 LogCrashResult(GetMostRecentCrashDump(), false); 299 LogCrashResult(GetMostRecentCrashDump(), false);
300 // Try and start up again. 300 // Try and start up again.
301 CloseBrowserAndServer(); 301 CloseBrowserAndServer();
302 LaunchBrowserAndServer(); 302 LaunchBrowserAndServer();
303 set_active_browser(automation()->GetBrowserWindow(0)); 303 set_active_browser(automation()->GetBrowserWindow(0).get());
304 if (DidCrash(true)) { 304 if (DidCrash(true)) {
305 no_errors = false; 305 no_errors = false;
306 // We crashed again, so skip to the end of the this command. 306 // We crashed again, so skip to the end of the this command.
307 while (init_reader_.Depth() != start_depth) { 307 while (init_reader_.Depth() != start_depth) {
308 ASSERT_TRUE(init_reader_.Read()) << "Malformed XML file."; 308 ASSERT_TRUE(init_reader_.Read()) << "Malformed XML file.";
309 } 309 }
310 } else { 310 } else {
311 // We didn't crash, so end the old element, logging a crash for that. 311 // We didn't crash, so end the old element, logging a crash for that.
312 // Then start a new element to log this command. 312 // Then start a new element to log this command.
313 xml_writer_.StartIndenting(); 313 xml_writer_.StartIndenting();
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 810 }
811 } 811 }
812 812
813 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 813 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
814 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 814 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
815 if (parsed_command_line.HasSwitch(kReproSwitch)) 815 if (parsed_command_line.HasSwitch(kReproSwitch))
816 RunReproduction(); 816 RunReproduction();
817 else 817 else
818 RunAutomatedUITest(); 818 RunAutomatedUITest();
819 } 819 }
OLDNEW
« no previous file with comments | « chrome/test/reliability/automated_ui_test_base.cc ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698