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

Side by Side Diff: image_burner_tester.cc

Issue 6357012: Use chromeos::IsBootDevicePath. (Closed) Base URL: http://git.chromium.org/git/image-burner.git@master
Patch Set: lint Created 9 years, 11 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
« no previous file with comments | « image_burn_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 <dbus/dbus-glib-lowlevel.h> 6 #include <dbus/dbus-glib-lowlevel.h>
7 #include <chromeos/dbus/dbus.h> 7 #include <chromeos/dbus/dbus.h>
8 #include <glib.h> 8 #include <glib.h>
9 #include <iostream> 9 #include <iostream>
10 #include <vector> 10 #include <vector>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 74
75 ~TestClient() { 75 ~TestClient() {
76 dbus::Disconnect(updateconnection_); 76 dbus::Disconnect(updateconnection_);
77 dbus::Disconnect(finishedconnection_); 77 dbus::Disconnect(finishedconnection_);
78 } 78 }
79 79
80 void StartTests() { 80 void StartTests() {
81 tests_.resize(0); 81 tests_.resize(0);
82 82
83 AddTest( 83 const char* const kImgSrc =
84 "/home/chronos/user/Downloads/chromeos_image/chroemos_image.bin.gz", 84 "/home/chronos/user/Downloads/chromeos_image/chromeos_image.bin.zip";
85 "/usr/local/chroemos_image.bin.gz");
86 85
87 AddTest( 86 // First 3 should fail because the target is on the root partition.
88 "/home/chronos/user/Downloads/chromeos_image/chroemos_image.bin.gz", 87 AddTest(kImgSrc, "/usr/local/chromeos_image.bin.zip");
89 "/dev/sda"); 88 AddTest(kImgSrc, "/dev/sda");
90 89 AddTest(kImgSrc, "/dev/sda1");
91 AddTest( 90 AddTest(kImgSrc, "/dev/sdb");
92 "/home/chronos/user/Downloads/chromeos_image/chroemos_image.bin.gz",
93 "/dev/sda1");
94
95 AddTest(
96 "/home/chronos/user/Downloads/chromeos_image/chroemos_image.bin.gz",
97 "/dev/sdb");
98 91
99 tests_it_ = tests_.begin(); 92 tests_it_ = tests_.begin();
100 RunNext(); 93 RunNext();
101 } 94 }
102 95
103 void RunNext() { 96 void RunNext() {
104 if (tests_it_ == tests_.end()) { 97 if (tests_it_ == tests_.end()) {
105 ::g_main_loop_quit(loop_); 98 ::g_main_loop_quit(loop_);
106 } else { 99 } else {
107 RunOne(); 100 RunOne();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 "/org/chromium/ImageBurner", 165 "/org/chromium/ImageBurner",
173 "org.chromium.ImageBurnerInterface"); 166 "org.chromium.ImageBurnerInterface");
174 chromeos::TestClient test(burn_proxy, loop); 167 chromeos::TestClient test(burn_proxy, loop);
175 168
176 test.StartTests(); 169 test.StartTests();
177 ::g_main_loop_run(loop); 170 ::g_main_loop_run(loop);
178 171
179 return 0; 172 return 0;
180 } 173 }
181 174
OLDNEW
« no previous file with comments | « image_burn_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698