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

Side by Side Diff: chrome_frame/test/urlmon_moniker_integration_test.cc

Issue 8427007: Thread::Stop() must be called before any subclass's destructor completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest version as trybot-ted Created 9 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
« no previous file with comments | « chrome/service/service_process.cc ('k') | chrome_frame/urlmon_url_request.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <atlbase.h> 5 #include <atlbase.h>
6 #include <atlcom.h> 6 #include <atlcom.h>
7 7
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "base/win/scoped_comptr.h" 9 #include "base/win/scoped_comptr.h"
10 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Runs an HTTP server on a worker thread that has a message loop. 53 // Runs an HTTP server on a worker thread that has a message loop.
54 class RunTestServer : public base::Thread { 54 class RunTestServer : public base::Thread {
55 public: 55 public:
56 RunTestServer() 56 RunTestServer()
57 : base::Thread("TestServer"), 57 : base::Thread("TestServer"),
58 default_response_("/", kTestContent), 58 default_response_("/", kTestContent),
59 ready_(::CreateEvent(NULL, TRUE, FALSE, NULL)) { 59 ready_(::CreateEvent(NULL, TRUE, FALSE, NULL)) {
60 } 60 }
61 61
62 ~RunTestServer() {
63 Stop();
64 }
65
62 bool Start() { 66 bool Start() {
63 bool ret = StartWithOptions(Options(MessageLoop::TYPE_UI, 0)); 67 bool ret = StartWithOptions(Options(MessageLoop::TYPE_UI, 0));
64 if (ret) { 68 if (ret) {
65 message_loop()->PostTask(FROM_HERE, 69 message_loop()->PostTask(FROM_HERE,
66 NewRunnableFunction(&RunTestServer::StartServer, this)); 70 NewRunnableFunction(&RunTestServer::StartServer, this));
67 wait_until_ready(); 71 wait_until_ready();
68 } 72 }
69 return ret; 73 return ret;
70 } 74 }
71 75
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 callback2.SetCallbackExpectations( 343 callback2.SetCallbackExpectations(
340 UrlmonMonikerTestCallback::EXPECT_NO_CALL, S_OK, false); 344 UrlmonMonikerTestCallback::EXPECT_NO_CALL, S_OK, false);
341 hr = callback2.CreateUrlMonikerAndBindToStorage(test_url, NULL); 345 hr = callback2.CreateUrlMonikerAndBindToStorage(test_url, NULL);
342 // S_OK means that the operation completed synchronously. 346 // S_OK means that the operation completed synchronously.
343 // Otherwise we'd get MK_S_ASYNCHRONOUS. 347 // Otherwise we'd get MK_S_ASYNCHRONOUS.
344 EXPECT_EQ(S_OK, hr); 348 EXPECT_EQ(S_OK, hr);
345 } 349 }
346 } 350 }
347 351
348 */ 352 */
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | chrome_frame/urlmon_url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698