Changeset 104482 in vbox for trunk/src/libs/xpcom18a4/xpcom/tests
- Timestamp:
- May 2, 2024 4:24:06 PM (10 months ago)
- svn:sync-xref-src-repo-rev:
- 163004
- Location:
- trunk/src/libs/xpcom18a4/xpcom/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/tests/TestAutoLock.cpp
r101921 r104482 93 93 vrc = RTThreadCreate(&hThread, run, NULL, 0 /*cbStack*/, 94 94 RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "AutoLockTest"); 95 if (RT_FAILURE(vrc)) 96 return RTEXITCODE_FAILURE; 95 97 96 98 // ...and now do the same thing ourselves -
trunk/src/libs/xpcom18a4/xpcom/tests/TestObserverService.cpp
r103140 r104482 127 127 NS_GET_IID(nsIObserverService), 128 128 (void **) &anObserverService); 129 #ifdef VBOX 129 130 130 bool fSuccess = res == NS_OK; 131 #endif 132 133 if (res == NS_OK) { 131 if (fSuccess) { 134 132 135 133 nsIObserver *aObserver = new TestObserver(NS_LITERAL_STRING("Observer-A")); … … 140 138 printf("Adding Observer-A as observer of topic-A...\n"); 141 139 rv = anObserverService->AddObserver(aObserver, topicA.get(), PR_FALSE); 142 #ifdef VBOX 143 fSuccess = fSuccess && 144 #endif 145 testResult(rv); 140 fSuccess = testResult(rv); 146 141 147 142 printf("Adding Observer-B as observer of topic-A...\n"); 148 143 rv = anObserverService->AddObserver(bObserver, topicA.get(), PR_FALSE); 149 #ifdef VBOX 150 fSuccess = fSuccess && 151 #endif 152 testResult(rv); 144 fSuccess = fSuccess && testResult(rv); 153 145 154 146 printf("Adding Observer-B as observer of topic-B...\n"); 155 147 rv = anObserverService->AddObserver(bObserver, topicB.get(), PR_FALSE); 156 #ifdef VBOX 157 fSuccess = fSuccess && 158 #endif 159 testResult(rv); 148 fSuccess = fSuccess && testResult(rv); 160 149 161 150 printf("Testing Notify(observer-A, topic-A)...\n"); … … 163 152 topicA.get(), 164 153 NS_LITERAL_STRING("Testing Notify(observer-A, topic-A)").get() ); 165 #ifdef VBOX 166 fSuccess = fSuccess && 167 #endif 168 testResult(rv); 154 fSuccess = fSuccess && testResult(rv); 169 155 170 156 printf("Testing Notify(observer-B, topic-B)...\n"); … … 172 158 topicB.get(), 173 159 NS_LITERAL_STRING("Testing Notify(observer-B, topic-B)").get() ); 174 #ifdef VBOX 175 fSuccess = fSuccess && 176 #endif 177 testResult(rv); 160 fSuccess = fSuccess && testResult(rv); 178 161 179 162 printf("Testing EnumerateObserverList (for topic-A)...\n"); 180 163 nsCOMPtr<nsISimpleEnumerator> e; 181 164 rv = anObserverService->EnumerateObservers(topicA.get(), getter_AddRefs(e)); 182 183 #ifdef VBOX 184 fSuccess = fSuccess && 185 #endif 186 testResult(rv); 165 fSuccess = fSuccess && testResult(rv); 187 166 188 167 printf("Enumerating observers of topic-A...\n"); … … 200 179 topicA.get(), 201 180 NS_LITERAL_STRING("during enumeration").get() ); 202 #ifdef VBOX 203 fSuccess = fSuccess && 204 #endif 205 testResult(rv); 181 fSuccess = fSuccess && testResult(rv); 206 182 } 207 183 } … … 210 186 printf("Removing Observer-A...\n"); 211 187 rv = anObserverService->RemoveObserver(aObserver, topicA.get()); 212 #ifdef VBOX 213 fSuccess = fSuccess && 214 #endif 215 testResult(rv); 188 fSuccess = fSuccess && testResult(rv); 216 189 217 190 218 191 printf("Removing Observer-B (topic-A)...\n"); 219 192 rv = anObserverService->RemoveObserver(bObserver, topicB.get()); 220 #ifdef VBOX 221 fSuccess = fSuccess && 222 #endif 223 testResult(rv); 193 fSuccess = fSuccess && testResult(rv); 224 194 printf("Removing Observer-B (topic-B)...\n"); 225 195 rv = anObserverService->RemoveObserver(bObserver, topicA.get()); 226 #ifdef VBOX 227 fSuccess = fSuccess && 228 #endif 229 testResult(rv); 230 231 #ifdef VBOX 196 fSuccess = fSuccess && testResult(rv); 197 232 198 /* Cleanup: */ 233 199 nsrefcnt refs = bObserver->Release(); … … 240 206 if (refs != 0) 241 207 printf("aObserver->Release() -> %d, expected 0\n", (int)refs); 242 #endif 243 } 244 #ifdef VBOX 208 } 209 245 210 return fSuccess ? 0 : 1; 246 #else 247 return NS_OK; 248 #endif 249 } 211 } -
trunk/src/libs/xpcom18a4/xpcom/tests/TestStrings.cpp
r103140 r104482 72 72 nsAutoString buf(aStr); 73 73 74 PRInt32 n = buf.FindChar(','); 75 76 n = buf.Length(); 74 PRInt32 n = buf.Length(); 77 75 78 76 buf.Cut(0, n + 1);
Note:
See TracChangeset
for help on using the changeset viewer.